From 58953e6193b25ca9fd7624954ef7cb986e43b3da Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 8 Sep 2014 13:37:22 +0200 Subject: settings to force encryption and setting for not saving messages to disk. fixed #353 --- src/eu/siacs/conversations/parser/MessageParser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/eu/siacs/conversations/parser') 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); -- cgit v1.2.3