diff options
author | Miquel Lionel <lionel@les-miquelots.net> | 2023-10-30 21:48:08 +0100 |
---|---|---|
committer | Miquel Lionel <lionel@les-miquelots.net> | 2023-10-30 21:48:08 +0100 |
commit | d761e8ccd5293d2f30a889b0cbe302c985aee68c (patch) | |
tree | 922bb248a7fee4cdff3da114abc7d77200f3d0da /libdino/src/service/conversation_manager.vala | |
parent | 302e954c99c71d670201828c6746dfaa40276d6d (diff) | |
parent | 3de716446819550514d50a8112f5b6dd0c662702 (diff) | |
download | dino-add_conversation_account_indicator.tar.gz dino-add_conversation_account_indicator.zip |
Show which account is currently used in conversation details in the about sectionadd_conversation_account_indicator
Diffstat (limited to 'libdino/src/service/conversation_manager.vala')
-rw-r--r-- | libdino/src/service/conversation_manager.vala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala index 59ccbac4..f966ccc7 100644 --- a/libdino/src/service/conversation_manager.vala +++ b/libdino/src/service/conversation_manager.vala @@ -29,6 +29,8 @@ public class ConversationManager : StreamInteractionModule, Object { 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); + stream_interactor.get_module(Calls.IDENTITY).call_incoming.connect(handle_new_call); + stream_interactor.get_module(Calls.IDENTITY).call_outgoing.connect(handle_new_call); } public Conversation create_conversation(Jid jid, Account account, Conversation.Type? type = null) { @@ -194,6 +196,11 @@ public class ConversationManager : StreamInteractionModule, Object { } } + private void handle_new_call(Call call, CallState state, Conversation conversation) { + conversation.last_active = call.time; + start_conversation(conversation); + } + private void add_conversation(Conversation conversation) { if (!conversations[conversation.account].has_key(conversation.counterpart)) { conversations[conversation.account][conversation.counterpart] = new ArrayList<Conversation>(Conversation.equals_func); |