From cc65567366c6e9d4989e3c8015c7b8f49b04203a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 14 Mar 2014 19:31:15 +0100 Subject: [PATCH] workaround for some weird clients sending empty string over otr --- src/eu/siacs/conversations/utils/MessageParser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/utils/MessageParser.java b/src/eu/siacs/conversations/utils/MessageParser.java index 290574e31..2e948b139 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);