end otr session if plain text message from another instance is being received

This commit is contained in:
iNPUTmice 2014-10-28 18:02:12 +01:00
parent f256a466d8
commit 962e8183f6
1 changed files with 8 additions and 1 deletions

View File

@ -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()) {