From 97df4a682bd36acd71ac16f2d5d149a797ec61c9 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 2 Dec 2017 17:48:26 +0100 Subject: [PATCH] MessageParser: ignore groupchat messages retrieved from user archive --- .../java/eu/siacs/conversations/parser/MessageParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 454cca7f0..2b84e4e31 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -400,6 +400,10 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } boolean isTypeGroupChat = packet.getType() == MessagePacket.TYPE_GROUPCHAT; + if (query != null && !query.muc() && isTypeGroupChat) { + Log.e(Config.LOGTAG,account.getJid().toBareJid()+": received groupchat ("+from+") message on regular MAM request. skipping"); + return; + } boolean isProperlyAddressed = (to != null) && (!to.isBareJid() || account.countPresences() == 0); boolean isMucStatusMessage = from.isBareJid() && mucUserElement != null && mucUserElement.hasChild("status"); if (packet.fromAccount(account)) {