diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-20 16:26:40 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-20 16:26:40 +0200 |
commit | 37aacbeb74919524138e5ab0d25f656f9a9f1b7d (patch) | |
tree | d523593c0833879d824a3792e5e186e63711843c /src/eu/siacs/conversations/entities/Message.java | |
parent | 0b86f65bdc8dfd979be752798b7cbc3c28317c53 (diff) |
fixed presence splitting
Diffstat (limited to 'src/eu/siacs/conversations/entities/Message.java')
-rw-r--r-- | src/eu/siacs/conversations/entities/Message.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index ce496d27..9505c5cf 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -246,9 +246,9 @@ public class Message extends AbstractEntity { public void setPresence(String presence) { if (presence == null) { - this.counterpart = this.counterpart.split("/")[0]; + this.counterpart = this.counterpart.split("/",2)[0]; } else { - this.counterpart = this.counterpart.split("/")[0] + "/" + presence; + this.counterpart = this.counterpart.split("/",2)[0] + "/" + presence; } } @@ -257,7 +257,7 @@ public class Message extends AbstractEntity { } public String getPresence() { - String[] counterparts = this.counterpart.split("/"); + String[] counterparts = this.counterpart.split("/",2); if (counterparts.length == 2) { return counterparts[1]; } else { |