extracting chat state for chat with self should not cause markRead event. fixes #3906
This commit is contained in:
parent
dc72bc5bc3
commit
ff13cc2766
|
@ -100,10 +100,13 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
ChatState state = ChatState.parse(packet);
|
ChatState state = ChatState.parse(packet);
|
||||||
if (state != null && c != null) {
|
if (state != null && c != null) {
|
||||||
final Account account = c.getAccount();
|
final Account account = c.getAccount();
|
||||||
Jid from = packet.getFrom();
|
final Jid from = packet.getFrom();
|
||||||
if (from.asBareJid().equals(account.getJid().asBareJid())) {
|
if (from.asBareJid().equals(account.getJid().asBareJid())) {
|
||||||
c.setOutgoingChatState(state);
|
c.setOutgoingChatState(state);
|
||||||
if (state == ChatState.ACTIVE || state == ChatState.COMPOSING) {
|
if (state == ChatState.ACTIVE || state == ChatState.COMPOSING) {
|
||||||
|
if (c.getContact().isSelf()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
mXmppConnectionService.markRead(c);
|
mXmppConnectionService.markRead(c);
|
||||||
activateGracePeriod(account);
|
activateGracePeriod(account);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue