diff options
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 9252842aa..030cf9664 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -875,7 +875,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl MamReference lastReceived = new MamReference(0); synchronized (this.messages) { for (int i = this.messages.size() - 1; i >= 0; --i) { - Message message = this.messages.get(i); + final Message message = this.messages.get(i); + if (message.getType() == Message.TYPE_PRIVATE) { + continue; //it's unsafe to use private messages as anchor. They could be coming from user archive + } if (message.getStatus() == Message.STATUS_RECEIVED || message.isCarbon() || message.getServerMsgId() != null) { lastReceived = new MamReference(message.getTimeSent(),message.getServerMsgId()); break; |