aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-04-23 15:10:35 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-04-23 15:10:35 +0200
commita363e0a5d8a6d90f6153c8526a38ec0055dc4141 (patch)
treedf870409aec1799f5965ff1d102681db926bb915 /src/main/java/eu
parentcd1fbf60ec920bbdb179c437a06db66a4de19483 (diff)
don't create templates for empty status messages
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 4aee6079..236877a5 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -3245,7 +3245,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
public void changeStatus(Account account, Presence.Status status, String statusMessage) {
- databaseBackend.insertPresenceTemplate(new PresenceTemplate(status, statusMessage));
+ if (!statusMessage.isEmpty()) {
+ databaseBackend.insertPresenceTemplate(new PresenceTemplate(status, statusMessage));
+ }
changeStatusReal(account, status, statusMessage);
}
@@ -3259,7 +3261,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
public void changeStatus(Presence.Status status, String statusMessage) {
- databaseBackend.insertPresenceTemplate(new PresenceTemplate(status, statusMessage));
+ if (!statusMessage.isEmpty()) {
+ databaseBackend.insertPresenceTemplate(new PresenceTemplate(status, statusMessage));
+ }
for(Account account : getAccounts()) {
changeStatusReal(account, status, statusMessage);
}