diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-06-01 00:25:14 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-06-01 00:25:14 +0200 |
commit | 5c5d5cc4e3eb8536e9becd010a114be002fdd742 (patch) | |
tree | c935a56161dc720394c09c34880352aa76055d4e /src/main/java | |
parent | 24ea66c9fcc374ea9b5f0b0057f244b21f6fef99 (diff) |
don't show empty templates
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Presences.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Presences.java b/src/main/java/eu/siacs/conversations/entities/Presences.java index c80783317..9e94ff2b3 100644 --- a/src/main/java/eu/siacs/conversations/entities/Presences.java +++ b/src/main/java/eu/siacs/conversations/entities/Presences.java @@ -59,7 +59,9 @@ public class Presences { synchronized (this.presences) { ArrayList<PresenceTemplate> templates = new ArrayList<>(presences.size()); for(Presence p : presences.values()) { - templates.add(new PresenceTemplate(p.getStatus(),p.getMessage())); + if (p.getMessage() != null && !p.getMessage().trim().isEmpty()) { + templates.add(new PresenceTemplate(p.getStatus(), p.getMessage())); + } } return templates; } |