support JEP 162 (show / hide some contacts according to their subscription / ask status)
This commit is contained in:
parent
fd99c19954
commit
bd868245e0
|
@ -143,6 +143,19 @@ class RosterWindow:
|
||||||
elif user.groups == []:
|
elif user.groups == []:
|
||||||
user.groups.append(_('General'))
|
user.groups.append(_('General'))
|
||||||
|
|
||||||
|
hide = True
|
||||||
|
if user.sub in ('both', 'to'):
|
||||||
|
hide = False
|
||||||
|
elif user.ask == 'subscribe':
|
||||||
|
hide = False
|
||||||
|
# FIXME: uncomment when we support contacts in no group
|
||||||
|
# elif user.name or len(user.groups):
|
||||||
|
elif user.name:
|
||||||
|
hide = False
|
||||||
|
|
||||||
|
# JEP-0162
|
||||||
|
if hide:
|
||||||
|
return
|
||||||
if user.show in ('offline', 'error') and \
|
if user.show in ('offline', 'error') and \
|
||||||
not showOffline and (not _('Transports') in user.groups or \
|
not showOffline and (not _('Transports') in user.groups or \
|
||||||
gajim.connections[account].connected < 2) and \
|
gajim.connections[account].connected < 2) and \
|
||||||
|
|
Loading…
Reference in New Issue