Use JID returned by the server during bind

Sam Whited created

Not just the resourcepart

Change summary

src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java 🔗

@@ -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();