diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-03-09 19:40:54 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-03-09 19:40:54 +0100 |
commit | c9f70d07b936eaa53ebb1d443a32029202d42cd5 (patch) | |
tree | 13fb659197f9148a4782f8990af8dc60ab37a515 /src/main/java/de/pixart/messenger | |
parent | 76d0fdcc5af795b02eb871f31f323436c7e19cdc (diff) |
deduplicate every message with a stanza-id from the server
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/MessageParser.java | 6 |
1 files changed, 3 insertions, 3 deletions
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; |