diff options
Diffstat (limited to 'src/eu/siacs/conversations/utils/MessageParser.java')
-rw-r--r-- | src/eu/siacs/conversations/utils/MessageParser.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/utils/MessageParser.java b/src/eu/siacs/conversations/utils/MessageParser.java index 6d644f03b..4bdb2539d 100644 --- a/src/eu/siacs/conversations/utils/MessageParser.java +++ b/src/eu/siacs/conversations/utils/MessageParser.java @@ -84,16 +84,15 @@ public class MessageParser { conversation.resetOtrSession(); Log.d(LOGTAG,"otr session stoped"); } + //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); } catch (Exception e) { conversation.resetOtrSession(); return 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); } public static Message parseGroupchat(MessagePacket packet, Account account, XmppConnectionService service) { |