don't correct a message if that would create a duplicate

This commit is contained in:
Daniel Gultsch 2016-12-09 20:03:48 +01:00
parent 88321c1e8c
commit 55b60f6b0f

View File

@ -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();