use introduced functions

This commit is contained in:
Nikos Kouremenos 2006-10-10 15:58:48 +00:00
parent a1102880b9
commit 9448a325c7
1 changed files with 6 additions and 14 deletions

View File

@ -222,6 +222,8 @@ class RosterWindow:
if jid == gajim.get_jid_from_account(account): if jid == gajim.get_jid_from_account(account):
self.add_self_contact(account) self.add_self_contact(account)
return return
if contact.sub != 'from':
return
if gajim.jid_is_transport(contact.jid): if gajim.jid_is_transport(contact.jid):
# if jid is transport, check if we wanna show it in roster # if jid is transport, check if we wanna show it in roster
if not gajim.config.get('show_transports_group'): if not gajim.config.get('show_transports_group'):
@ -238,12 +240,7 @@ class RosterWindow:
elif contact.name or len(contact.groups): elif contact.name or len(contact.groups):
hide = False hide = False
observer = False observer = contact.is_observer()
if hide:
if contact.sub == 'from':
observer = True
else:
return
if observer: if observer:
# if he has a tag, remove it # if he has a tag, remove it
@ -397,14 +394,9 @@ class RosterWindow:
return return
if contact.jid in gajim.to_be_removed[account]: if contact.jid in gajim.to_be_removed[account]:
gajim.to_be_removed[account].remove(contact.jid) gajim.to_be_removed[account].remove(contact.jid)
# JEP-0162
hide = True
if contact.sub in ('both', 'to', 'from'): hide = contact.is_hidden_in_roster()
hide = False
elif contact.ask == 'subscribe':
hide = False
elif contact.name or len(contact.groups):
hide = False
showOffline = gajim.config.get('showoffline') showOffline = gajim.config.get('showoffline')
if (contact.show in ('offline', 'error') or hide) and \ if (contact.show in ('offline', 'error') or hide) and \