aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-14 19:31:15 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-14 19:31:15 +0100
commitcc65567366c6e9d4989e3c8015c7b8f49b04203a (patch)
tree98b4cb2d7141bf7a09b6345694646349c95faf2e /src/eu/siacs
parent1bdbeb620fb99b0c15cb80d8f782f82118eb2bcf (diff)
workaround for some weird clients sending empty string over otr
Diffstat (limited to 'src/eu/siacs')
-rw-r--r--src/eu/siacs/conversations/utils/MessageParser.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/utils/MessageParser.java b/src/eu/siacs/conversations/utils/MessageParser.java
index 290574e3..2e948b13 100644
--- a/src/eu/siacs/conversations/utils/MessageParser.java
+++ b/src/eu/siacs/conversations/utils/MessageParser.java
@@ -84,7 +84,9 @@ public class MessageParser {
conversation.resetOtrSession();
return null;
}
- if (body == null) {
+
+ //isEmpty is a work around for some weird clients which send emtpty strings over otr
+ if ((body == null)||(body.isEmpty())) {
return null;
}
return new Message(conversation, packet.getFrom(), body, Message.ENCRYPTION_OTR,Message.STATUS_RECIEVED);