primitivus(contact list): fixed room not always appearing correctly in contact list

This commit is contained in:
Goffi 2019-03-01 17:33:15 +01:00
commit 472a43597e

View file

@ -344,7 +344,7 @@ class ProfileContactList(object):
@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 @@ class ProfileContactList(object):
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 @@ class ProfileContactList(object):
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 @@ class QuickContactListHandler(object):
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