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
This commit is contained in:
Daniel Gultsch 2019-07-14 17:58:28 +02:00
parent 719b35e431
commit bc3e5f1dd4
1 changed files with 2 additions and 1 deletions

View File

@ -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) {