diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-28 18:02:12 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-28 18:02:12 +0100 |
commit | 962e8183f641b839a47a39635083c4a91c0fb329 (patch) | |
tree | a5372891d8938d56684a0f1f57adc30f9194e8ad /src | |
parent | f256a466d812744937f50e4270bd915d34be536d (diff) |
end otr session if plain text message from another instance is being received
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/parser/MessageParser.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java index 1d80ec5c2..383ac89a6 100644 --- a/src/eu/siacs/conversations/parser/MessageParser.java +++ b/src/eu/siacs/conversations/parser/MessageParser.java @@ -256,7 +256,6 @@ public class MessageParser extends AbstractParser implements return null; } } - return finishedMessage; } @@ -478,6 +477,14 @@ public class MessageParser extends AbstractParser implements } Conversation conversation = message.getConversation(); conversation.add(message); + + if (message.getStatus() == Message.STATUS_RECEIVED + && conversation.getOtrSession() != null + && !conversation.getOtrSession().getSessionID().getUserID() + .equals(message.getPresence())) { + conversation.endOtrIfNeeded(); + } + if (packet.getType() != MessagePacket.TYPE_ERROR) { if (message.getEncryption() == Message.ENCRYPTION_NONE || mXmppConnectionService.saveEncryptedMessages()) { |