diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-06-12 10:41:47 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-06-12 10:41:47 +0200 |
commit | 18871230e1c0ef76431b97037e6073856279f93e (patch) | |
tree | 35cff8432c581df13ad89b33beb2f7b4ffd88df5 /src/eu/siacs/conversations/services/XmppConnectionService.java | |
parent | e353a1c109f68f212c9fbf76c5186be97c835628 (diff) |
send otr messages when contacts comes online
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 16814baa..20268574 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -98,10 +98,13 @@ public class XmppConnectionService extends Service { public OnContactStatusChanged onContactStatusChanged = new OnContactStatusChanged() { @Override - public void onContactStatusChanged(Contact contact) { + public void onContactStatusChanged(Contact contact, boolean online) { Conversation conversation = findActiveConversation(contact); if (conversation != null) { conversation.endOtrIfNeeded(); + if (online&&(contact.getPresences().size() == 1)) { + sendUnsendMessages(conversation); + } } } }; |