From ff13cc27661ab4342d903287d152d344c5dc70e3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 20 Oct 2020 10:20:58 +0200 Subject: [PATCH] extracting chat state for chat with self should not cause markRead event. fixes #3906 --- .../java/eu/siacs/conversations/parser/MessageParser.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 7812faa91..569425292 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -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); }