deduplicate every message with a stanza-id from the server

This commit is contained in:
Daniel Gultsch 2017-03-06 11:24:04 +01:00
parent 6088913fb6
commit 4a7dbaab1e
1 changed files with 3 additions and 3 deletions

View File

@ -532,9 +532,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;