# HG changeset patch # User Goffi # Date 1551457995 -3600 # Node ID 08b54bf77c5419a6289426190061208c4548b6d5 # Parent 9a3b99acad9191995c0ea62969c83ff33f167680 primitivus(contact list): fixed room not always appearing correctly in contact list diff -r 9a3b99acad91 -r 08b54bf77c54 sat_frontends/quick_frontend/quick_contact_list.py --- 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