Do not hide big brother contacts when a child has pending events. Fixes #3921

This commit is contained in:
Stephan Erb 2008-06-15 23:51:40 +00:00
parent c5f7922e29
commit 0d27f521d4
1 changed files with 18 additions and 2 deletions

View File

@ -1331,6 +1331,22 @@ class RosterWindow:
if type_ == 'contact':
if gajim.config.get('showoffline'):
return True
bb_jid = None
bb_account = None
family = gajim.contacts.get_metacontacts_family(account, jid)
if family:
nearby_family, bb_jid, bb_account = \
self._get_nearby_family_and_big_brother(family, account)
if (bb_jid, bb_account) == (jid, account):
# Show the big brother if a child has pending events
for data in nearby_family:
jid = data['jid']
account = data['account']
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
if self.contact_is_visible(contact, account):
return True
return False
else:
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
return self.contact_is_visible(contact, account)
if type_ == 'agent':