diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-07-21 18:20:26 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-07-21 18:20:26 +0200 |
commit | a787f58a9075f8fa29703b6c1ab89ba5e1a0addf (patch) | |
tree | b0d29e3f431bda0347f5abfa1e3520bbb7e3942e /src/eu/siacs/conversations | |
parent | 2fe20ffa8e8cfdb6b089e034c4f02010a7c740e6 (diff) |
fixed #292
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index ad522fd9..edd01ef3 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -901,6 +901,16 @@ public class XmppConnectionService extends Service { } public void deleteAccount(Account account) { + for(Conversation conversation : conversations) { + if (conversation.getAccount() == account) { + if (conversation.getMode() == Conversation.MODE_MULTI) { + leaveMuc(conversation); + } else if (conversation.getMode() == Conversation.MODE_SINGLE) { + conversation.endOtrIfNeeded(); + } + conversations.remove(conversation); + } + } if (account.getXmppConnection() != null) { this.disconnect(account, true); } |