aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2016-05-05 19:30:53 +0200
committerChristian S <christian@pix-art.de>2016-05-05 19:30:53 +0200
commit27ccf4e08f2547f372196bf381915ed1e6204ad8 (patch)
tree05749ea85a8421b77daf3c04d316c958895e3601 /src/main/java/eu/siacs/conversations/services
parent626d0d3260d792843bebf2a8b8a62c1a026dd314 (diff)
parent6e0ec9b924173bd2afe3b87646e3b1f4e907b7c1 (diff)
Merge remote-tracking branch 'refs/remotes/siacs/master' into development
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 521a0bcf0..5c4a56006 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -2997,9 +2997,10 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
public void sendCreateAccountWithCaptchaPacket(Account account, String id, Data data) {
- XmppConnection connection = account.getXmppConnection();
+ final XmppConnection connection = account.getXmppConnection();
if (connection != null) {
- connection.sendCaptchaRegistryRequest(id, data);
+ IqPacket request = mIqGenerator.generateCreateAccountWithCaptcha(account, id, data);
+ sendIqPacket(account, request, connection.registrationResponseListener);
}
}
@@ -3252,18 +3253,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);
}
}
@@ -3273,7 +3274,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);
}
}