From c9f70d07b936eaa53ebb1d443a32029202d42cd5 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 9 Mar 2017 19:40:54 +0100 Subject: deduplicate every message with a stanza-id from the server --- src/main/java/de/pixart/messenger/parser/MessageParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java index ba8995108..1551f691a 100644 --- a/src/main/java/de/pixart/messenger/parser/MessageParser.java +++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java @@ -527,9 +527,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece return; } - boolean checkForDuplicates = query != null - || (isTypeGroupChat && packet.hasChild("delay", "urn:xmpp:delay")) - || message.getType() == Message.TYPE_PRIVATE; + boolean checkForDuplicates = (isTypeGroupChat && packet.hasChild("delay", "urn:xmpp:delay")) + || message.getType() == Message.TYPE_PRIVATE + || message.getServerMsgId() != null; if (checkForDuplicates && conversation.hasDuplicateMessage(message)) { Log.d(Config.LOGTAG, "skipping duplicate message from " + message.getCounterpart().toString() + " " + message.getBody()); return; -- cgit v1.2.3