aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-04-13 21:44:50 +0200
committerChristian Schneppe <christian@pix-art.de>2017-04-13 21:44:50 +0200
commitbc03a692264de9e6b06539a8abf17b69cc65a2ff (patch)
tree0a44340ca40635a78c4cd3b3b3e881ecda1a9e62 /src/main/java/de/pixart/messenger/entities
parentc42d2759f89a39d6caada419653b2b05bf38ef3d (diff)
be more careful with corner cases when mentioning multiple people
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java11
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();