From bc3e5f1dd4b27953d41ec9afad2e3e091c7a6b7d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 14 Jul 2019 17:58:28 +0200 Subject: [PATCH] muc message corrections only compare bare jid true counterpart during live messages we only store the bare real jid; on muc catch up we might get the full jid for that reason we only compare bare jids --- 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 5adaffe34..33179b851 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -543,7 +543,8 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece final boolean fingerprintsMatch = replacedMessage.getFingerprint() == null || replacedMessage.getFingerprint().equals(message.getFingerprint()); final boolean trueCountersMatch = replacedMessage.getTrueCounterpart() != null - && replacedMessage.getTrueCounterpart().equals(message.getTrueCounterpart()); + && message.getTrueCounterpart() != null + && replacedMessage.getTrueCounterpart().asBareJid().equals(message.getTrueCounterpart().asBareJid()); final boolean mucUserMatches = query == null && replacedMessage.sameMucUser(message); //can not be checked when using mam final boolean duplicate = conversation.hasDuplicateMessage(message); if (fingerprintsMatch && (trueCountersMatch || !conversationMultiMode || mucUserMatches) && !duplicate) {