Merge pull request #930 from betheg/otr
otr: switch to the otr-state the partner alternate.
This commit is contained in:
commit
4afdd6480a
|
@ -102,8 +102,10 @@ public class MessageParser extends AbstractParser implements
|
||||||
body = otrSession.transformReceiving(body);
|
body = otrSession.transformReceiving(body);
|
||||||
SessionStatus after = otrSession.getSessionStatus();
|
SessionStatus after = otrSession.getSessionStatus();
|
||||||
if ((before != after) && (after == SessionStatus.ENCRYPTED)) {
|
if ((before != after) && (after == SessionStatus.ENCRYPTED)) {
|
||||||
|
conversation.setNextEncryption(Message.ENCRYPTION_OTR);
|
||||||
mXmppConnectionService.onOtrSessionEstablished(conversation);
|
mXmppConnectionService.onOtrSessionEstablished(conversation);
|
||||||
} else if ((before != after) && (after == SessionStatus.FINISHED)) {
|
} else if ((before != after) && (after == SessionStatus.FINISHED)) {
|
||||||
|
conversation.setNextEncryption(Message.ENCRYPTION_NONE);
|
||||||
conversation.resetOtrSession();
|
conversation.resetOtrSession();
|
||||||
mXmppConnectionService.updateConversationUi();
|
mXmppConnectionService.updateConversationUi();
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,6 +298,7 @@ public class ConversationFragment extends Fragment {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
getActivity().invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue