From 8a45a732263b30589a54de7b034e73ed52a5cd16 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 16 Oct 2006 21:37:32 +0000 Subject: [PATCH] show in roster not in roster contacts. also fixes a TB when receiving messages from not in roster contacts. --- src/common/contacts.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/contacts.py b/src/common/contacts.py index a8d228285..20ab66f25 100644 --- a/src/common/contacts.py +++ b/src/common/contacts.py @@ -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