diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-22 19:52:34 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-22 20:49:03 +0100 |
commit | 72ce4b07c1bd53b1842f213925c9c1f6d5a99003 (patch) | |
tree | a4b1e2e142c7f96fc9c561559736755518a37ad3 /src/main/java/de/pixart/messenger/parser | |
parent | b7f933051498df20772ba4a00f05feb1972343a6 (diff) |
rethink mam catchup strategies
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/MessageParser.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java index 45472e278..b1d67b933 100644 --- a/src/main/java/de/pixart/messenger/parser/MessageParser.java +++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java @@ -381,7 +381,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } if ((body != null || pgpEncrypted != null || axolotlEncrypted != null) && !isMucStatusMessage) { - Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.toBareJid(), isTypeGroupChat, query); + Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.toBareJid(), isTypeGroupChat, false, query); final boolean conversationMultiMode = conversation.getMode() == Conversation.MODE_MULTI; if (isTypeGroupChat) { if (counterpart.getResourcepart().equals(conversation.getMucOptions().getActualNick())) { @@ -539,8 +539,11 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } else { conversation.add(message); } + if (query != null) { + query.incrementActualMessageCount(); + } - if (query == null || query.getWith() == null) { //either no mam or catchup + if (query == null || !query.isCatchup()) { //either no mam or catchup if (status == Message.STATUS_SEND || status == Message.STATUS_SEND_RECEIVED) { mXmppConnectionService.markRead(conversation); if (query == null) { |