aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-05-05 13:17:04 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-05-05 13:17:04 +0200
commit6e0ec9b924173bd2afe3b87646e3b1f4e907b7c1 (patch)
tree40008448652eef1f3edc1ae4f2ca8bec2560ac16 /src/main/java/eu/siacs/conversations/services
parent12704fa640ba7ea028f247f2709202cb6a8ec7e1 (diff)
republish pgp signature when changing status
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index ba9d79689..7aac94b6e 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -3258,18 +3258,18 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
return pending;
}
- public void changeStatus(Account account, Presence.Status status, String statusMessage) {
+ public void changeStatus(Account account, Presence.Status status, String statusMessage, boolean send) {
if (!statusMessage.isEmpty()) {
databaseBackend.insertPresenceTemplate(new PresenceTemplate(status, statusMessage));
}
- changeStatusReal(account, status, statusMessage);
+ changeStatusReal(account, status, statusMessage, send);
}
- private void changeStatusReal(Account account, Presence.Status status, String statusMessage) {
+ private void changeStatusReal(Account account, Presence.Status status, String statusMessage, boolean send) {
account.setPresenceStatus(status);
account.setPresenceStatusMessage(statusMessage);
databaseBackend.updateAccount(account);
- if (!account.isOptionSet(Account.OPTION_DISABLED)) {
+ if (!account.isOptionSet(Account.OPTION_DISABLED) && send) {
sendPresence(account);
}
}
@@ -3279,7 +3279,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
databaseBackend.insertPresenceTemplate(new PresenceTemplate(status, statusMessage));
}
for(Account account : getAccounts()) {
- changeStatusReal(account, status, statusMessage);
+ changeStatusReal(account, status, statusMessage, true);
}
}