From aa4b15de7263aa088946c8288bae19c6549ba99c Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 28 Aug 2012 10:39:08 +0200 Subject: [PATCH] when we come ack from invisible, restore the block list if we block some contacts. Fixes #7215 --- src/common/connection.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 43311d482..f35b3807e 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1792,9 +1792,12 @@ class Connection(CommonConnection, ConnectionHandlers): def _change_from_invisible(self): if self.privacy_rules_supported: - iq = self.build_privacy_rule('visible', 'allow') - self.connection.send(iq) - self.activate_privacy_rule('visible') + if self.blocked_list: + self.activate_privacy_rule('block') + else: + iq = self.build_privacy_rule('visible', 'allow') + self.connection.send(iq) + self.activate_privacy_rule('visible') def _update_status(self, show, msg): xmpp_show = helpers.get_xmpp_show(show)