From c2fbdbde830fb3f15e4bdd1c1fb904e69b68927e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 16 Feb 2016 14:22:47 +0100 Subject: log reason why otr message won't be parsed --- src/main/java/eu/siacs/conversations/parser/MessageParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 620039a1..69b0e828 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -312,7 +312,7 @@ public class MessageParser extends AbstractParser implements } boolean isTypeGroupChat = packet.getType() == MessagePacket.TYPE_GROUPCHAT; - boolean isProperlyAddressed = (to != null ) && (!to.isBareJid() || account.countPresences() == 1); + boolean isProperlyAddressed = (to != null ) && (!to.isBareJid() || account.countPresences() <= 1); boolean isMucStatusMessage = from.isBareJid() && mucUserElement != null && mucUserElement.hasChild("status"); if (packet.fromAccount(account)) { status = Message.STATUS_SEND; @@ -357,6 +357,7 @@ public class MessageParser extends AbstractParser implements return; } } else { + Log.d(Config.LOGTAG,account.getJid().toBareJid()+": ignoring OTR message from "+from+" isForwarded="+Boolean.toString(isForwarded)+", isProperlyAddressed="+Boolean.valueOf(isProperlyAddressed)); message = new Message(conversation, body, Message.ENCRYPTION_NONE, status); } } else if (pgpEncrypted != null) { -- cgit v1.2.3