From 5e1492fbff8c8377abedac776405a09424a6a20e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 23 Apr 2015 17:37:47 +0200 Subject: [PATCH] send invite to other instanzes after creating ad hoc conference. fixes #1136 --- .../conversations/services/XmppConnectionService.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 3e8ce65f2..c0b609f3f 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1537,6 +1537,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa for (Jid invite : jids) { invite(conversation, invite); } + if (account.countPresences() > 1) { + directInvite(conversation, account.getJid().toBareJid()); + } if (callback != null) { callback.success(conversation); } @@ -2022,6 +2025,11 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa sendMessagePacket(conversation.getAccount(), packet); } + public void directInvite(Conversation conversation, Jid jid) { + MessagePacket packet = mMessageGenerator.directInvite(conversation,jid); + sendMessagePacket(conversation.getAccount(),packet); + } + public void resetSendingToWaiting(Account account) { for (Conversation conversation : getConversations()) { if (conversation.getAccount() == account) {