comparison frontends/src/wix/contact_list.py @ 1000:6f1e03068b5f

primitivus: fixes contact group update
author souliane <souliane@mailoo.org>
date Sun, 27 Apr 2014 18:22:12 +0200
parents 084b52afdceb
children 5a6354ff468c
comparison
equal deleted inserted replaced
999:c37a24922f27 1000:6f1e03068b5f
74 74
75 def update_jid(self, jid): 75 def update_jid(self, jid):
76 self.replace(jid) 76 self.replace(jid)
77 77
78 def replace(self, contact, groups=None, attributes=None): 78 def replace(self, contact, groups=None, attributes=None):
79 """Add a contact to the list if doesn't exist, else update it.
80
81 @param jid (JID)
82 @param groups (list): list of groups or None to ignore the groups membership.
83 @param attributes (dict)
84
85 XXX: None value for 'groups' has a different meaning than [None] which is for the default group.
86 """
79 debug(_("update %s") % contact) 87 debug(_("update %s") % contact)
80 if not self.__find_idx(contact): 88 if not self.__find_idx(contact):
81 self.add(contact, groups) 89 self.add(contact, groups)
82 else: 90 else:
83 for i in self.__find_idx(contact): 91 for i in self.__find_idx(contact):