aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/parser/MessageParser.java9
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 1d80ec5c..383ac89a 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()) {