mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-01 05:02:21 -05:00
end otr session if plain text message from another instance is being received
This commit is contained in:
parent
f256a466d8
commit
962e8183f6
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user