From 18871230e1c0ef76431b97037e6073856279f93e Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 12 Jun 2014 10:41:47 +0200 Subject: send otr messages when contacts comes online --- src/eu/siacs/conversations/services/XmppConnectionService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java') diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 16814baa3..20268574d 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); + } } } }; -- cgit v1.2.3