aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/entities/Message.java')
-rw-r--r--src/eu/siacs/conversations/entities/Message.java6
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 {