read marker from mam. only trust true counterpart when mam:2 is being used

This commit is contained in:
Daniel Gultsch 2017-12-02 22:13:59 +01:00
parent ffb3eeb913
commit 4b5db2fb45
1 changed files with 1 additions and 1 deletions

View File

@ -750,7 +750,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
} else {
final Jid fallback = conversation.getMucOptions().getTrueCounterpart(counterpart);
Jid trueJid = getTrueCounterpart(query != null ? mucUserElement : null, fallback);
Jid trueJid = getTrueCounterpart((query != null && query.safeToExtractTrueCounterpart()) ? mucUserElement : null, fallback);
ReadByMarker readByMarker = ReadByMarker.from(counterpart, trueJid);
if (message.addReadByMarker(readByMarker)) {
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": added read by (" + readByMarker.getRealJid() + ") to message '" + message.getBody() + "'");