primitivus: fixes contact group update

This commit is contained in:
souliane 2014-04-27 18:22:12 +02:00
commit f3a0686176

View file

@ -54,7 +54,14 @@ class QuickContactList(object):
self.specials.clear()
def replace(self, jid, groups=None, attributes=None):
"""add a contact to the list if doesn't exist, else update it"""
"""Add a contact to the list if doesn't exist, else update it.
@param jid (JID)
@param groups (list): list of groups or None to ignore the groups membership.
@param attributes (dict)
XXX: None value for 'groups' has a different meaning than [None] which is for the default group.
"""
if attributes and 'name' in attributes:
self.setCache(jid, 'name', attributes['name'])