save login nick for mucs during join
This commit is contained in:
parent
e3ebccc762
commit
66e3ccc2dc
|
@ -969,6 +969,7 @@ public class XmppConnectionService extends Service {
|
||||||
String nick = conversation.getMucOptions().getProposedNick();
|
String nick = conversation.getMucOptions().getProposedNick();
|
||||||
conversation.getMucOptions().setJoinNick(nick);
|
conversation.getMucOptions().setJoinNick(nick);
|
||||||
PresencePacket packet = new PresencePacket();
|
PresencePacket packet = new PresencePacket();
|
||||||
|
String joinJid = conversation.getMucOptions().getJoinJid();
|
||||||
packet.setAttribute("to",conversation.getMucOptions().getJoinJid());
|
packet.setAttribute("to",conversation.getMucOptions().getJoinJid());
|
||||||
Element x = new Element("x");
|
Element x = new Element("x");
|
||||||
x.setAttribute("xmlns", "http://jabber.org/protocol/muc");
|
x.setAttribute("xmlns", "http://jabber.org/protocol/muc");
|
||||||
|
@ -988,6 +989,10 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
packet.addChild(x);
|
packet.addChild(x);
|
||||||
sendPresencePacket(account, packet);
|
sendPresencePacket(account, packet);
|
||||||
|
if (!joinJid.equals(conversation.getContactJid())) {
|
||||||
|
conversation.setContactJid(joinJid);
|
||||||
|
databaseBackend.updateConversation(conversation);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
account.pendingConferenceJoins.add(conversation);
|
account.pendingConferenceJoins.add(conversation);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue