diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-16 14:12:30 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-16 14:12:30 +0100 |
commit | 0116551ca9b99c58e0459d52f66d5d9bfa1c2afa (patch) | |
tree | 7a221e528a12c6a9998e1f3ff6cdda02356f6601 /src/eu/siacs/conversations/services/XmppConnectionService.java | |
parent | 0b3b0da2e8db96f68ddfe35d6f9294ee58c9323e (diff) |
bug fixes with leaving muc on connection loss.
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 815e06af..0e4852af 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -1082,14 +1082,16 @@ public class XmppConnectionService extends Service { public void disconnect(Account account, boolean force) { if ((account.getStatus() == Account.STATUS_ONLINE)||(account.getStatus() == Account.STATUS_DISABLED)) { - List<Conversation> conversations = getConversations(); - for (int i = 0; i < conversations.size(); i++) { - Conversation conversation = conversations.get(i); - if (conversation.getAccount() == account) { - if (conversation.getMode() == Conversation.MODE_MULTI) { - leaveMuc(conversation); - } else { - conversation.endOtrIfNeeded(); + if (!force) { + List<Conversation> conversations = getConversations(); + for (int i = 0; i < conversations.size(); i++) { + Conversation conversation = conversations.get(i); + if (conversation.getAccount() == account) { + if (conversation.getMode() == Conversation.MODE_MULTI) { + leaveMuc(conversation); + } else { + conversation.endOtrIfNeeded(); + } } } } |