MessageParser: ignore groupchat messages retrieved from user archive

This commit is contained in:
Daniel Gultsch 2017-12-02 17:48:26 +01:00
parent 6449881961
commit 97df4a682b
1 changed files with 4 additions and 0 deletions

View File

@ -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)) {