Use JID returned by the server during bind
Not just the resourcepart
This commit is contained in:
parent
805717673c
commit
1a0b538166
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue