aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/parser
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-08 13:37:22 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-08 13:37:22 +0200
commit58953e6193b25ca9fd7624954ef7cb986e43b3da (patch)
tree63a56da9c490a5ced9bff32ceec5be4fb793feac /src/eu/siacs/conversations/parser
parent3b9fd28ef4b8c615ec27c7265c2e38dfa31d41fd (diff)
settings to force encryption and setting for not saving messages to disk. fixed #353
Diffstat (limited to 'src/eu/siacs/conversations/parser')
-rw-r--r--src/eu/siacs/conversations/parser/MessageParser.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java
index fa5e0a59..ed846fe1 100644
--- a/src/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/eu/siacs/conversations/parser/MessageParser.java
@@ -453,7 +453,9 @@ public class MessageParser extends AbstractParser implements
Conversation conversation = message.getConversation();
conversation.getMessages().add(message);
if (packet.getType() != MessagePacket.TYPE_ERROR) {
- mXmppConnectionService.databaseBackend.createMessage(message);
+ if (message.getEncryption() == Message.ENCRYPTION_NONE || mXmppConnectionService.saveEncryptedMessages()) {
+ mXmppConnectionService.databaseBackend.createMessage(message);
+ }
}
notify = notify && !conversation.isMuted();
mXmppConnectionService.notifyUi(conversation, notify);