diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-12-08 21:59:14 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-12-10 14:08:06 +0100 |
commit | 0ab530932ae559d9b2a0dd8cbc57530fa8552319 (patch) | |
tree | 8595e8968eaeafcab11757b892fdfcb6e567f84a /src/main/java/eu/siacs/conversations/parser | |
parent | 4a94389f052afab8b0424bd56af3e0741a9ee430 (diff) |
added max history age (default 1w). automatically sort newly added mam messages
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index b902db510..3714ac904 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -549,8 +549,11 @@ public class MessageParser extends AbstractParser implements } Conversation conversation = message.getConversation(); conversation.add(message); - conversation.setLastMessageReceived(System.currentTimeMillis()); - mXmppConnectionService.updateConversation(conversation); + if (account.getXmppConnection() != null && account.getXmppConnection().getFeatures().advancedStreamFeaturesLoaded()) { + if (conversation.setLastMessageReceived(System.currentTimeMillis())) { + mXmppConnectionService.updateConversation(conversation); + } + } if (message.getStatus() == Message.STATUS_RECEIVED && conversation.getOtrSession() != null |