extracting chat state for chat with self should not cause markRead event. fixes #3906

(cherry picked from commit ff13cc27661ab4342d903287d152d344c5dc70e3)
This commit is contained in:
Daniel Gultsch 2020-10-20 10:20:58 +02:00 committed by Christian Schneppe
parent b25dd292b9
commit 479864448a

View file

@ -102,10 +102,13 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
ChatState state = ChatState.parse(packet);
if (state != null && c != null) {
final Account account = c.getAccount();
Jid from = packet.getFrom();
final Jid from = packet.getFrom();
if (from.asBareJid().equals(account.getJid().asBareJid())) {
c.setOutgoingChatState(state);
if (state == ChatState.ACTIVE || state == ChatState.COMPOSING) {
if (c.getContact().isSelf()) {
return false;
}
mXmppConnectionService.markRead(c);
activateGracePeriod(account);
}