aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-20 16:26:40 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-20 16:26:40 +0200
commit37aacbeb74919524138e5ab0d25f656f9a9f1b7d (patch)
treed523593c0833879d824a3792e5e186e63711843c /src/eu/siacs/conversations/xmpp
parent0b86f65bdc8dfd979be752798b7cbc3c28317c53 (diff)
fixed presence splitting
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java2
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index e7b25e26..e02c772d 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -657,7 +657,7 @@ public class XmppConnection implements Runnable {
if (bind != null) {
Element jid = bind.findChild("jid");
if (jid != null) {
- account.setResource(jid.getContent().split("/")[1]);
+ account.setResource(jid.getContent().split("/",2)[1]);
if (streamFeatures.hasChild("sm", "urn:xmpp:sm:3")) {
smVersion = 3;
EnablePacket enable = new EnablePacket(smVersion);
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
index f42482e8..4eac99e6 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
@@ -256,12 +256,12 @@ public class JingleConnection implements Downloadable {
this.status = STATUS_INITIATED;
Conversation conversation = this.mXmppConnectionService
.findOrCreateConversation(account,
- packet.getFrom().split("/")[0], false);
+ packet.getFrom().split("/",2)[0], false);
this.message = new Message(conversation, "", Message.ENCRYPTION_NONE);
this.message.setType(Message.TYPE_IMAGE);
this.message.setStatus(Message.STATUS_RECEIVED_OFFER);
this.message.setDownloadable(this);
- String[] fromParts = packet.getFrom().split("/");
+ String[] fromParts = packet.getFrom().split("/",2);
this.message.setPresence(fromParts[1]);
this.account = account;
this.initiator = packet.getFrom();