From 513427c8a8c567b2b90e2f86f9a33ae2252cecb1 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 23 Nov 2017 18:18:30 +0100 Subject: [PATCH] MAM: start muc catchup with last sent message if serverId is available --- src/main/java/eu/siacs/conversations/entities/Conversation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index ce048c6df..2c4b0395e 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -839,7 +839,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl synchronized (this.messages) { for(int i = this.messages.size() - 1; i >= 0; --i) { Message message = this.messages.get(i); - if (message.getStatus() == Message.STATUS_RECEIVED || message.isCarbon()) { + if (message.getStatus() == Message.STATUS_RECEIVED || message.isCarbon() || message.getServerMsgId() != null) { lastReceived = new MamReference(message.getTimeSent(),message.getServerMsgId()); break; }