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

This commit is contained in:
Daniel Gultsch 2015-04-23 17:37:47 +02:00
parent 3a627f72fb
commit 5e1492fbff
1 changed files with 8 additions and 0 deletions

View File

@ -1537,6 +1537,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
for (Jid invite : jids) { for (Jid invite : jids) {
invite(conversation, invite); invite(conversation, invite);
} }
if (account.countPresences() > 1) {
directInvite(conversation, account.getJid().toBareJid());
}
if (callback != null) { if (callback != null) {
callback.success(conversation); callback.success(conversation);
} }
@ -2022,6 +2025,11 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
sendMessagePacket(conversation.getAccount(), packet); 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) { public void resetSendingToWaiting(Account account) {
for (Conversation conversation : getConversations()) { for (Conversation conversation : getConversations()) {
if (conversation.getAccount() == account) { if (conversation.getAccount() == account) {