diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-08-26 12:11:12 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-08-26 12:11:12 +0200 |
commit | ea2ce78d6e0b37db21ebffd9f0f991ab25e17f1a (patch) | |
tree | 764004ff6199b05984c773fc7f200b8caf160fea /src/main/java/eu/siacs/conversations/entities | |
parent | 3e0636367a733285526c709138110ddb86899196 (diff) |
be more restrictive about marking messages as sent_received in muc parser
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index 36d6b43b0..e6c044a1c 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -201,14 +201,25 @@ public class Conversation extends AbstractEntity implements Blockable { } } - public Message findSentMessageWithUuid(String uuid) { + public Message findSentMessageWithUuidOrRemoteId(String id) { synchronized (this.messages) { for (Message message : this.messages) { - if (uuid.equals(message.getUuid()) - || (message.getStatus() >= Message.STATUS_SEND && uuid - .equals(message.getRemoteMsgId()))) { + if (id.equals(message.getUuid()) + || (message.getStatus() >= Message.STATUS_SEND + && id.equals(message.getRemoteMsgId()))) { return message; - } + } + } + } + return null; + } + + public Message findSentMessageWithUuid(String id) { + synchronized (this.messages) { + for (Message message : this.messages) { + if (id.equals(message.getUuid())) { + return message; + } } } return null; |