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

This commit is contained in:
Daniel Gultsch 2020-10-20 10:20:58 +02:00
parent dc72bc5bc3
commit ff13cc2766
1 changed files with 4 additions and 1 deletions

View File

@ -100,10 +100,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);
}