when we come ack from invisible, restore the block list if we block some contacts. Fixes #7215

This commit is contained in:
Yann Leboulanger 2012-08-28 10:39:08 +02:00
parent bb4459ca2b
commit aa4b15de72
1 changed files with 6 additions and 3 deletions

View File

@ -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)