show in roster not in roster contacts. also fixes a TB when receiving messages from not in roster contacts.
This commit is contained in:
parent
0909fae3cf
commit
8a45a73226
|
@ -63,14 +63,14 @@ class Contact:
|
||||||
'''if contact should not be visible in roster'''
|
'''if contact should not be visible in roster'''
|
||||||
# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
|
# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
|
||||||
if self.sub in ('both', 'to'):
|
if self.sub in ('both', 'to'):
|
||||||
hide = False
|
return False
|
||||||
elif self.sub in ('none', 'from') and self.ask == 'subscribe':
|
if self.sub in ('none', 'from') and self.ask == 'subscribe':
|
||||||
hide = False
|
return False
|
||||||
elif self.sub in ('none', 'from') and (self.name or len(self.groups)):
|
if self.sub in ('none', 'from') and (self.name or len(self.groups)):
|
||||||
hide = False
|
return False
|
||||||
else:
|
if _('Not in Roster') in self.groups:
|
||||||
hide = True
|
return False
|
||||||
return hide
|
return True
|
||||||
|
|
||||||
def is_observer(self):
|
def is_observer(self):
|
||||||
# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
|
# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
|
||||||
|
|
Loading…
Reference in New Issue