From ed764789f132c61bbab1cca1cbd4065649f97d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sun, 15 Oct 2017 21:32:16 +0200 Subject: [PATCH] Show blocked contacts as offline --- gajim/common/connection.py | 1 + gajim/common/connection_handlers.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/gajim/common/connection.py b/gajim/common/connection.py index 87d29f9a8..679cacb41 100644 --- a/gajim/common/connection.py +++ b/gajim/common/connection.py @@ -1639,6 +1639,7 @@ class Connection(CommonConnection, ConnectionHandlers): self.connection.send(iq) return for contact in contact_list: + contact.show = 'offline' self.send_custom_status('offline', message, contact.jid) max_order = self.get_max_blocked_list_order() new_rule = {'order': str(max_order + 1), diff --git a/gajim/common/connection_handlers.py b/gajim/common/connection_handlers.py index fa13dee65..480dfcc1b 100644 --- a/gajim/common/connection_handlers.py +++ b/gajim/common/connection_handlers.py @@ -2104,6 +2104,9 @@ ConnectionHandlersBase, ConnectionJingle, ConnectionIBBytestream): for jid in obj.blocked_jids: if jid not in self.blocked_contacts: self.blocked_contacts.append(jid) + contact_list = app.contacts.get_contacts(self.name, jid) + for contact in contact_list: + contact.show = 'offline' for jid in obj.unblocked_jids: if jid in self.blocked_contacts: self.blocked_contacts.remove(jid)