aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-10-06 11:44:27 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-10-06 11:44:27 +0200
commite6af5020555a2b19a5038647c7f55221fc8a4739 (patch)
tree8aa74c70b5722504339843cf11a85101eeda2b3c /src/main/java
parent89edd83609d1b7d1a7a866e5bc326397a44afce6 (diff)
clear notification and activate grace period when receiving chat marker from another instance
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index ec900de4..4d057756 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -40,6 +40,10 @@ public class MessageParser extends AbstractParser implements
Jid from = packet.getFrom();
if (from.toBareJid().equals(account.getJid().toBareJid())) {
conversation.setOutgoingChatState(state);
+ if (state == ChatState.ACTIVE || state == ChatState.COMPOSING) {
+ mXmppConnectionService.markRead(conversation);
+ account.activateGracePeriod();
+ }
return false;
} else {
return conversation.setIncomingChatState(state);
@@ -300,7 +304,7 @@ public class MessageParser extends AbstractParser implements
return;
}
- if (extractChatState(mXmppConnectionService.find(account, from), packet)) {
+ if (extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), packet)) {
mXmppConnectionService.updateConversationUi();
}