comparison frontends/src/wix/contact_list.py @ 1058:0a9986452bba

frontends: fixes bug with private message introduced with revision 1000 (6f1e03068b5f) + display messages from contacts not in roster
author souliane <souliane@mailoo.org>
date Thu, 29 May 2014 14:34:01 +0200
parents 5a6354ff468c
children 75025461141f
comparison
equal deleted inserted replaced
1057:7ea0215e7092 1058:0a9986452bba
77 self.replace(jid) 77 self.replace(jid)
78 78
79 def replace(self, contact, groups=None, attributes=None): 79 def replace(self, contact, groups=None, attributes=None):
80 """Add a contact to the list if doesn't exist, else update it. 80 """Add a contact to the list if doesn't exist, else update it.
81 81
82 This method can be called with groups=None for the purpose of updating
83 the contact's attributes (e.g. nickname). In that case, the groups
84 attribute must not be set to the default group but ignored. If not,
85 you may move your contact from its actual group(s) to the default one.
86
87 None value for 'groups' has a different meaning than [None] which is for the default group.
88
82 @param jid (JID) 89 @param jid (JID)
83 @param groups (list): list of groups or None to ignore the groups membership. 90 @param groups (list): list of groups or None to ignore the groups membership.
84 @param attributes (dict) 91 @param attributes (dict)
85
86 XXX: None value for 'groups' has a different meaning than [None] which is for the default group.
87 """ 92 """
88 log.debug(_("update %s") % contact) 93 log.debug(_("update %s") % contact)
89 if not self.__find_idx(contact): 94 if not self.__find_idx(contact):
90 self.add(contact, groups) 95 self.add(contact, groups)
91 else: 96 else: