diff --git a/frontends/src/primitivus/contact_list.py b/frontends/src/primitivus/contact_list.py index c5345546..83c54fbd 100644 --- a/frontends/src/primitivus/contact_list.py +++ b/frontends/src/primitivus/contact_list.py @@ -148,8 +148,8 @@ class ContactList(PrimitivusWidget, QuickContactList): self.update() self._emit('click', entity) - def updatePresence(self, entity, show, priority, statuses): - super(ContactList, self).updatePresence(entity, show, priority, statuses) + def onPresenceUpdate(self, entity, show, priority, statuses, profile): + super(ContactList, self).onPresenceUpdate(entity, show, priority, statuses, profile) self.update() # Methods to build the widget diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index b78de440..34999360 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -349,7 +349,7 @@ class QuickApp(object): profile = kwargs.get("profile") for listener, profiles_filter in listeners.iteritems(): if profile is None or not profiles_filter or profile in profiles_filter: - listener(*args) + listener(*args, **kwargs) def check_profile(self, profile): """Tell if the profile is currently followed by the application""" diff --git a/frontends/src/quick_frontend/quick_contact_list.py b/frontends/src/quick_frontend/quick_contact_list.py index 2dd1d84e..7790e619 100644 --- a/frontends/src/quick_frontend/quick_contact_list.py +++ b/frontends/src/quick_frontend/quick_contact_list.py @@ -73,7 +73,7 @@ class QuickContactList(QuickWidget): 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 @@ class QuickContactList(QuickWidget): 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: