diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-12-09 20:03:48 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-12-09 20:03:48 +0100 |
commit | 55b60f6b0fa8ab0084cba30f82696f852debc1d6 (patch) | |
tree | 84e5f26581ac0f61aac23aa99ef1ee78cd598586 /src | |
parent | 88321c1e8c6e119fb200b3d0bbaa4f304334d226 (diff) |
don't correct a message if that would create a duplicate
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index c8ae1fdc..19c2aa78 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(); |