send invite to other instanzes after creating ad hoc conference. fixes #1136

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 8 
1 file changed, 8 insertions(+)

Detailed changes

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) {