From 0ab530932ae559d9b2a0dd8cbc57530fa8552319 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 8 Dec 2014 21:59:14 +0100 Subject: added max history age (default 1w). automatically sort newly added mam messages --- src/main/java/eu/siacs/conversations/parser/MessageParser.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/parser') 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 -- cgit v1.2.3