From 29ffc8a5446b39cca32ab17fc8e007147f035f56 Mon Sep 17 00:00:00 2001 From: souliane Date: Fri, 20 Mar 2015 17:47:48 +0100 Subject: [PATCH] plugin XEP-0085, quick_frontend: fixes chat states --- frontends/src/quick_frontend/quick_app.py | 2 +- src/plugins/plugin_xep_0085.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index 7ed671ca..db4ebd59 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -586,7 +586,7 @@ class QuickApp(object): continue to_display = C.USER_CHAT_STATES[state] if (state and widget.type == C.CHAT_GROUP) else state if widget.type == C.CHAT_GROUP and from_jid_s == C.ENTITY_ALL: - for occupant in [jid.newResource(self.target, nick) for nick in widget.occupants]: + for occupant in [jid.newResource(widget.target, nick) for nick in widget.occupants]: widget.updateEntityState(occupant, 'chat_state', to_display) elif from_jid.bare == widget.target.bare: # roster contact or MUC occupant widget.updateEntityState(from_jid, 'chat_state', to_display) diff --git a/src/plugins/plugin_xep_0085.py b/src/plugins/plugin_xep_0085.py index e2625a46..37b7b5f9 100755 --- a/src/plugins/plugin_xep_0085.py +++ b/src/plugins/plugin_xep_0085.py @@ -140,7 +140,7 @@ class XEP_0085(object): self.host.memory.updateEntityData(entity_jid, ENTITY_KEY, value, profile_key=profile) if not value or value == DELETE_VALUE: # reinit chat state UI for this or these contact(s) - self.host.bridge.chatStateReceived(entity_jid.full(), "", profile) + self.host.bridge.chatStateReceived(unicode(entity_jid), "", profile) def paramUpdateTrigger(self, name, value, category, type_, profile): """Reset all the existing chat state entity data associated with this profile after a parameter modification. @@ -151,7 +151,7 @@ class XEP_0085(object): @param type_: parameter type """ if (category, name) == (PARAM_KEY, PARAM_NAME): - self.updateCache(C.ENTITY_ALL, True if bool("true") else DELETE_VALUE, profile=profile) + self.updateCache(C.ENTITY_ALL, True if C.bool(value) else DELETE_VALUE, profile=profile) return False return True