Use JID returned by the server during bind

Not just the resourcepart
This commit is contained in:
Sam Whited 2016-09-12 11:33:36 -05:00
parent 805717673c
commit 1a0b538166

View file

@ -981,7 +981,7 @@ public class XmppConnection implements Runnable {
final Element jid = bind.findChild("jid");
if (jid != null && jid.getContent() != null) {
try {
account.setResource(Jid.fromString(jid.getContent()).getResourcepart());
account.setJid(Jid.fromString(jid.getContent()));
if (streamFeatures.hasChild("session")
&& !streamFeatures.findChild("session").hasChild("optional")) {
sendStartSession();