From 55b60f6b0fa8ab0084cba30f82696f852debc1d6 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 9 Dec 2016 20:03:48 +0100 Subject: [PATCH] don't correct a message if that would create a duplicate --- 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 c8ae1fdcc..19c2aa782 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -484,7 +484,8 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece || replacedMessage.getFingerprint().equals(message.getFingerprint()); final boolean trueCountersMatch = replacedMessage.getTrueCounterpart() != null && replacedMessage.getTrueCounterpart().equals(message.getTrueCounterpart()); - if (fingerprintsMatch && (trueCountersMatch || !conversationMultiMode)) { + final boolean duplicate = conversation.hasDuplicateMessage(message); + if (fingerprintsMatch && (trueCountersMatch || !conversationMultiMode) && !duplicate) { Log.d(Config.LOGTAG, "replaced message '" + replacedMessage.getBody() + "' with '" + message.getBody() + "'"); synchronized (replacedMessage) { final String uuid = replacedMessage.getUuid();