diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index a3811a751..f654902b4 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -303,6 +303,17 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl return null; } + public boolean hasMessageWithCounterpart(Jid counterpart) { + synchronized (this.messages) { + for (Message message : this.messages) { + if (counterpart.equals(message.getCounterpart())) { + return true; + } + } + } + return false; + } + public void populateWithMessages(final List<Message> messages) { synchronized (this.messages) { messages.clear(); |