diff options
author | Christian S <christian@pix-art.de> | 2015-08-26 20:02:36 +0200 |
---|---|---|
committer | Christian S <christian@pix-art.de> | 2015-08-26 20:02:36 +0200 |
commit | 0f0054ef8629a285726a9190a297a43f91494af4 (patch) | |
tree | ceb391c2b3f7cf098c0dff988e02dd4be941ac5d /src/main/java/eu/siacs/conversations/entities | |
parent | dfe58eaf341efe988f80faf5dc888900d28aa37a (diff) | |
parent | c4a548ada00f5abd175e28ac1df5204f8bbc092f (diff) |
Version 1.6.5
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 cea0d700f..ef52e3bb0 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -202,14 +202,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; |