only end otr session if there is more than one contact presence. reset otherwise
This commit is contained in:
parent
e4567e7a62
commit
7b4f3637db
|
@ -127,7 +127,11 @@ public class XmppConnectionService extends Service {
|
||||||
public void onContactStatusChanged(Contact contact, boolean online) {
|
public void onContactStatusChanged(Contact contact, boolean online) {
|
||||||
Conversation conversation = find(getConversations(), contact);
|
Conversation conversation = find(getConversations(), contact);
|
||||||
if (conversation != null) {
|
if (conversation != null) {
|
||||||
|
if (online && contact.getPresences().size() > 1) {
|
||||||
conversation.endOtrIfNeeded();
|
conversation.endOtrIfNeeded();
|
||||||
|
} else {
|
||||||
|
conversation.resetOtrSession();
|
||||||
|
}
|
||||||
if (online && (contact.getPresences().size() == 1)) {
|
if (online && (contact.getPresences().size() == 1)) {
|
||||||
sendUnsendMessages(conversation);
|
sendUnsendMessages(conversation);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue