Mercurial > libervia-backend
diff frontends/src/quick_frontend/quick_contact_list.py @ 1339:18cd46a264e9 frontends_multi_profiles
quick frontends, primitivus: fixed listener calls (kwargs where forgotten) + fixed presence listener + renamed updatePresence to onPresenceUpdate for consistency with oter listeners
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 24 Feb 2015 16:52:44 +0100 |
parents | f29beedb33b0 |
children | e31a07a5614d |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_contact_list.py Tue Feb 24 14:40:19 2015 +0100 +++ b/frontends/src/quick_frontend/quick_contact_list.py Tue Feb 24 16:52:44 2015 +0100 @@ -73,7 +73,7 @@ self.host.bridge.asyncGetParamA(C.SHOW_OFFLINE_CONTACTS, "General", profile_key=profile, callback=self._showOfflineContacts) # FIXME: workaround for a pyjamas issue: calling hash on a class method always return a different value if that method is defined directly within the class (with the "def" keyword) - self.presenceListener = self.updatePresence + self.presenceListener = self.onPresenceUpdate self.host.addListener('presence', self.presenceListener, [profile]) def __contains__(self, entity): @@ -367,13 +367,14 @@ set_.difference_update(to_remove) self.update() - def updatePresence(self, entity, show, priority, statuses): + def onPresenceUpdate(self, entity, show, priority, statuses, profile): """Update entity's presence status - @param entity(jid.JID): entity to update's entity + @param entity(jid.JID): entity updated @param show: availability @parap priority: resource's priority @param statuses: dict of statuses + @param profile: %(doc_profile)s """ cache = self.getCache(entity) if show == C.PRESENCE_UNAVAILABLE: