diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Presences.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Presences.java b/src/main/java/eu/siacs/conversations/entities/Presences.java index 7630fd93..c8078331 100644 --- a/src/main/java/eu/siacs/conversations/entities/Presences.java +++ b/src/main/java/eu/siacs/conversations/entities/Presences.java @@ -75,9 +75,9 @@ public class Presences { ArrayList<String> messages = new ArrayList<>(); synchronized (this.presences) { for(Presence presence : this.presences.values()) { - String message = presence.getMessage(); - if (message != null && !message.trim().isEmpty()) { - messages.add(message.trim()); + String message = presence.getMessage() == null ? null : presence.getMessage().trim(); + if (message != null && !message.isEmpty() && !messages.contains(message)) { + messages.add(message); } } } |