diff options
author | lovetox <philipp@hoerist.com> | 2022-08-08 00:59:15 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-08-09 17:48:39 +0300 |
commit | 9aa7d949c897d9ea747d9a9899f2c1cd015fa0b2 (patch) | |
tree | c70d521ca1ef902ba5244d478ebbf3e095992ae1 | |
parent | 759fb3312e4dc5df1c43c88dd35fe7d887990a5e (diff) |
other: Add contacts when opening chats
-rw-r--r-- | gajim/gtk/chat_page.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gajim/gtk/chat_page.py b/gajim/gtk/chat_page.py index ce1c3a77c..b1b3b099d 100644 --- a/gajim/gtk/chat_page.py +++ b/gajim/gtk/chat_page.py @@ -224,6 +224,18 @@ class ChatPage(Gtk.Box): type_: str, pinned: bool = False, select: bool = False) -> None: + + client = app.get_client(account) + + if type_ == 'chat': + client.get_module('Contacts').add_chat_contact(jid) + + elif type_ == 'groupchat': + client.get_module('Contacts').add_group_chat_contact(jid) + + elif type_ == 'pm': + client.get_module('Contacts').add_group_private_contact(jid) + if self.chat_exists(account, jid): if select: self._chat_list_stack.select_chat(account, jid) |