don't show empty templates

This commit is contained in:
Daniel Gultsch 2016-06-01 00:25:14 +02:00
parent 24ea66c9fc
commit 5c5d5cc4e3
1 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,9 @@ public class Presences {
synchronized (this.presences) { synchronized (this.presences) {
ArrayList<PresenceTemplate> templates = new ArrayList<>(presences.size()); ArrayList<PresenceTemplate> templates = new ArrayList<>(presences.size());
for(Presence p : presences.values()) { 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; return templates;
} }