mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
bugfix: changed condition of onOtrSessionEstablished being called
fixed #1263 fixed #1260 fixed #1293
This commit is contained in:
parent
96f38324f8
commit
f1ee5cccf0
@ -66,18 +66,18 @@ public class MessageParser extends AbstractParser implements
|
||||
try {
|
||||
conversation.setLastReceivedOtrMessageId(id);
|
||||
Session otrSession = conversation.getOtrSession();
|
||||
SessionStatus before = otrSession.getSessionStatus();
|
||||
body = otrSession.transformReceiving(body);
|
||||
SessionStatus after = otrSession.getSessionStatus();
|
||||
if ((before != after) && (after == SessionStatus.ENCRYPTED)) {
|
||||
SessionStatus status = otrSession.getSessionStatus();
|
||||
if (body == null && status == SessionStatus.ENCRYPTED) {
|
||||
conversation.setNextEncryption(Message.ENCRYPTION_OTR);
|
||||
mXmppConnectionService.onOtrSessionEstablished(conversation);
|
||||
} else if ((before != after) && (after == SessionStatus.FINISHED)) {
|
||||
return null;
|
||||
} else if (body == null && status == SessionStatus.FINISHED) {
|
||||
conversation.setNextEncryption(Message.ENCRYPTION_NONE);
|
||||
conversation.resetOtrSession();
|
||||
mXmppConnectionService.updateConversationUi();
|
||||
}
|
||||
if ((body == null) || (body.isEmpty())) {
|
||||
return null;
|
||||
} else if (body == null || (body.isEmpty())) {
|
||||
return null;
|
||||
}
|
||||
if (body.startsWith(CryptoHelper.FILETRANSFER)) {
|
||||
|
Loading…
Reference in New Issue
Block a user