Skip to content
Snippets Groups Projects
Commit 8a45a732 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

show in roster not in roster contacts. also fixes a TB when receiving messages...

show in roster not in roster contacts. also fixes a TB when receiving messages from not in roster contacts.
parent 0909fae3
No related branches found
No related tags found
No related merge requests found
......@@ -63,14 +63,14 @@ class Contact:
'''if contact should not be visible in roster'''
# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
if self.sub in ('both', 'to'):
hide = False
elif self.sub in ('none', 'from') and self.ask == 'subscribe':
hide = False
elif self.sub in ('none', 'from') and (self.name or len(self.groups)):
hide = False
else:
hide = True
return hide
return False
if self.sub in ('none', 'from') and self.ask == 'subscribe':
return False
if self.sub in ('none', 'from') and (self.name or len(self.groups)):
return False
if _('Not in Roster') in self.groups:
return False
return True
def is_observer(self):
# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment