aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-12-10 20:52:09 +0100
committerChristian Schneppe <christian@pix-art.de>2017-12-10 20:52:09 +0100
commit06ed2863bd0bcccd6435bc092954021d288e7144 (patch)
tree58175a6247a0784a1a2d5dd91d691a3a4225644a /src/main
parentc445b63eba06af69e301b2f30d8f473447d4179e (diff)
MessageParser: ignore groupchat messages retrieved from user archive
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java
index 60c97f394..9d64110a8 100644
--- a/src/main/java/de/pixart/messenger/parser/MessageParser.java
+++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java
@@ -398,6 +398,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)) {