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
1 changed files with 1 additions and 1 deletions

View File

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