diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 9d0071af2..9fcb83aa5 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -2092,11 +2092,7 @@ public class XmppConnectionService extends Service { } else { conversation.endOtrIfNeeded(); if (conversation.getContact().getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { - Log.d(Config.LOGTAG, "Canceling presence request from " + conversation.getJid().toString()); - sendPresencePacket( - conversation.getAccount(), - mPresenceGenerator.stopPresenceUpdatesTo(conversation.getContact()) - ); + stopPresenceUpdatesTo(conversation.getContact()); } } updateConversation(conversation); @@ -2105,6 +2101,12 @@ public class XmppConnectionService extends Service { } } + public void stopPresenceUpdatesTo(Contact contact) { + Log.d(Config.LOGTAG, "Canceling presence request from " + contact.getJid().toString()); + sendPresencePacket(contact.getAccount(), mPresenceGenerator.stopPresenceUpdatesTo(contact)); + contact.resetOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST); + } + public void createAccount(final Account account) { account.initAccountServices(this); databaseBackend.createAccount(account); |