diff sat_frontends/quick_frontend/quick_contact_list.py @ 2828:08b54bf77c54

primitivus(contact list): fixed room not always appearing correctly in contact list
author Goffi <goffi@goffi.org>
date Fri, 01 Mar 2019 17:33:15 +0100
parents 003b8b4b56a7
children 82d8243e6ad1
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_contact_list.py	Fri Mar 01 17:32:15 2019 +0100
+++ b/sat_frontends/quick_frontend/quick_contact_list.py	Fri Mar 01 17:33:15 2019 +0100
@@ -344,7 +344,7 @@
         @param name: name of the data (can't be "jids")
         @param value: value to set
         """
-        assert name is not "jids"
+        assert name != "jids"
         self._groups[group][name] = value
 
     def getGroupData(self, group, name=None):
@@ -425,7 +425,7 @@
         self.update()
 
     def setContact(self, entity, groups=None, attributes=None, in_roster=False):
-        """Add a contact to the list if doesn't exist, else update it.
+        """Add a contact to the list if it doesn't exist, else update it.
 
         This method can be called with groups=None for the purpose of updating
         the contact's attributes (e.g. nickname). In that case, the groups
@@ -552,6 +552,7 @@
                 self.show_entities_with_notifs
                 and next(self.host.getNotifs(entity.bare, profile=self.profile), None)
             )
+            or entity.resource is None and self.isRoom(entity.bare)
         )
 
     def anyEntityVisible(self, entities, check_resources=False):
@@ -767,7 +768,7 @@
         global handler
         if handler is not None:
             raise exceptions.InternalError(
-                u"QuickContactListHandler must be " u"instanciated only once"
+                u"QuickContactListHandler must be instanciated only once"
             )
         handler = self
         self._clist = {}  # key: profile, value: ProfileContactList