aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/service/conversation_manager.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala
index 039bad53..10ba5f6d 100644
--- a/libdino/src/service/conversation_manager.vala
+++ b/libdino/src/service/conversation_manager.vala
@@ -26,6 +26,7 @@ public class ConversationManager : StreamInteractionModule, Object {
this.stream_interactor = stream_interactor;
stream_interactor.add_module(this);
stream_interactor.account_added.connect(on_account_added);
+ stream_interactor.account_removed.connect(on_account_removed);
stream_interactor.get_module(MessageProcessor.IDENTITY).received_pipeline.connect(new MessageListener(stream_interactor));
stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect(handle_sent_message);
}
@@ -136,6 +137,14 @@ public class ConversationManager : StreamInteractionModule, Object {
}
}
+ private void on_account_removed(Account account) {
+ foreach (Gee.List<Conversation> list in conversations[account].values) {
+ foreach (var conversation in list) {
+ if(conversation.active) conversation_deactivated(conversation);
+ }
+ }
+ }
+
private class MessageListener : Dino.MessageListener {
public string[] after_actions_const = new string[]{ "DEDUPLICATE", "FILTER_EMPTY" };