don't close otr session on every presence change
This commit is contained in:
parent
94aee445e7
commit
343bb7ff28
|
@ -193,15 +193,12 @@ public class XmppConnectionService extends Service {
|
||||||
sendUnsentMessages(conversation);
|
sendUnsentMessages(conversation);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (contact.getPresences().size() >= 1) {
|
//check if the resource we are haveing a conversation with is still online
|
||||||
if (conversation.hasValidOtrSession()) {
|
if (conversation.hasValidOtrSession()) {
|
||||||
String otrResource = conversation.getOtrSession().getSessionID().getUserID();
|
String otrResource = conversation.getOtrSession().getSessionID().getUserID();
|
||||||
if (!(Arrays.asList(contact.getPresences().toResourceArray()).contains(otrResource))) {
|
if (!(Arrays.asList(contact.getPresences().toResourceArray()).contains(otrResource))) {
|
||||||
conversation.endOtrIfNeeded();
|
conversation.endOtrIfNeeded();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
conversation.endOtrIfNeeded();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue