aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-12-02 17:48:26 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-12-02 17:48:26 +0100
commit97df4a682bd36acd71ac16f2d5d149a797ec61c9 (patch)
tree043bdef152003e850df14976c8dd97240a57606f
parent6449881961326ff00b3cfa73b8f0dd686fb18a41 (diff)
MessageParser: ignore groupchat messages retrieved from user archive
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 454cca7..2b84e4e 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)) {