aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-11-23 18:18:30 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-11-23 18:18:30 +0100
commit513427c8a8c567b2b90e2f86f9a33ae2252cecb1 (patch)
tree403c977dd6c43714f166282cb5108000857c32b6
parent7d04e6331a4820be9856f07743158de5285aa49d (diff)
MAM: start muc catchup with last sent message if serverId is available
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
index ce048c6..2c4b039 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;
}