diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/MessageParser.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java index f3be9651f..760b1b068 100644 --- a/src/main/java/de/pixart/messenger/parser/MessageParser.java +++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java @@ -413,10 +413,6 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece return; } - if (query == null && extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet)) { - mXmppConnectionService.updateConversationUi(); - } - if ((body != null || pgpEncrypted != null || axolotlEncrypted != null || oobUrl != null) && !isMucStatusMessage) { final Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.toBareJid(), isTypeGroupChat, false, query, false); final boolean conversationMultiMode = conversation.getMode() == Conversation.MODE_MULTI; @@ -467,6 +463,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } message = parseAxolotlChat(axolotlEncrypted, origin, conversation, status); if (message == null) { + if (query == null && extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet)) { + mXmppConnectionService.updateConversationUi(); + } return; } if (conversationMultiMode) { @@ -539,6 +538,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece if (replacedMessage.getStatus() == Message.STATUS_RECEIVED) { replacedMessage.markUnread(); } + extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet); mXmppConnectionService.updateMessage(replacedMessage, uuid); mXmppConnectionService.getNotificationService().updateNotification(false); if (mXmppConnectionService.confirmMessages() && (replacedMessage.trusted() || replacedMessage.getType() == Message.TYPE_PRIVATE) && remoteMsgId != null && !isForwarded && !isTypeGroupChat) { @@ -596,6 +596,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } if (query == null) { + extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet); mXmppConnectionService.updateConversationUi(); } @@ -622,6 +623,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } } } else if (!packet.hasChild("body")) { //no body + if (query == null && extractChatState(mXmppConnectionService.find(account, counterpart.toBareJid()), isTypeGroupChat, packet)) { + mXmppConnectionService.updateConversationUi(); + } final Conversation conversation = mXmppConnectionService.find(account, from.toBareJid()); if (isTypeGroupChat) { if (packet.hasChild("subject")) { |