diff options
author | steckbrief <steckbrief@chefmail.de> | 2018-05-11 19:49:27 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2018-05-11 19:49:27 +0200 |
commit | bff97731deed4c599dcb6c3a2887c9f47165dd3f (patch) | |
tree | 1a1479be225fef127146f58d69f32a947c4d013e /src/main/java/de/thedevstack/conversationsplus/xmpp/XmppConnection.java | |
parent | 1d8c547b447d68daf079d9db2b1d792fc631e462 (diff) |
introduces JidUtil for Jid creation, fixes duplication of childs while adding childs with xmlns and name
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp/XmppConnection.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/xmpp/XmppConnection.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/XmppConnection.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/XmppConnection.java index f6e6edb8..14f2a648 100644 --- a/src/main/java/de/thedevstack/conversationsplus/xmpp/XmppConnection.java +++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/XmppConnection.java @@ -96,6 +96,7 @@ import de.thedevstack.conversationsplus.xmpp.stanzas.streammgmt.AckPacket; import de.thedevstack.conversationsplus.xmpp.stanzas.streammgmt.EnablePacket; import de.thedevstack.conversationsplus.xmpp.stanzas.streammgmt.RequestPacket; import de.thedevstack.conversationsplus.xmpp.stanzas.streammgmt.ResumePacket; +import de.thedevstack.conversationsplus.xmpp.jid.JidUtil; public class XmppConnection implements Runnable { private static final int DEFAULT_PORT = 5222; @@ -898,7 +899,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.setResource(JidUtil.fromString(jid.getContent()).getResourcepart()); } catch (final InvalidJidException e) { // TODO: Handle the case where an external JID is technically invalid? } |