From 5c5d5cc4e3eb8536e9becd010a114be002fdd742 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 1 Jun 2016 00:25:14 +0200 Subject: [PATCH] don't show empty templates --- src/main/java/eu/siacs/conversations/entities/Presences.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 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; }