This commit is contained in:
iNPUTmice 2014-07-21 18:20:26 +02:00
parent 2fe20ffa8e
commit a787f58a90

View file

@ -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);
}