aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-04 19:56:37 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-04 19:56:37 +0200
commitb8d289a9324431534f1acfa6fe684decb01f22fb (patch)
treec1138b3f4fe27c0df3710535638e0e2119fe93af /src
parent01389e900bb7331d53dbe835802757541e1ebf6a (diff)
fixed #342 - otr with facebook and other services without resources
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/entities/Message.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java
index f36ffa90..2b76773b 100644
--- a/src/eu/siacs/conversations/entities/Message.java
+++ b/src/eu/siacs/conversations/entities/Message.java
@@ -244,7 +244,7 @@ public class Message extends AbstractEntity {
}
public void setPresence(String presence) {
- if (presence == null || presence.isEmpty()) {
+ if (presence == null) {
this.counterpart = this.counterpart.split("/")[0];
} else {
this.counterpart = this.counterpart.split("/")[0] + "/" + presence;
@@ -260,7 +260,11 @@ public class Message extends AbstractEntity {
if (counterparts.length == 2) {
return counterparts[1];
} else {
- return null;
+ if (this.counterpart.contains("/")) {
+ return "";
+ } else {
+ return null;
+ }
}
}