aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser/MessageParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser/MessageParser.java')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java7
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 b902db51..3714ac90 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