aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-03-09 19:40:54 +0100
committerChristian Schneppe <christian@pix-art.de>2017-03-09 19:40:54 +0100
commitc9f70d07b936eaa53ebb1d443a32029202d42cd5 (patch)
tree13fb659197f9148a4782f8990af8dc60ab37a515 /src/main/java/de/pixart
parent76d0fdcc5af795b02eb871f31f323436c7e19cdc (diff)
deduplicate every message with a stanza-id from the server
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java6
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;