From d4c1ff53090abf1d0e672db3d26a9c88318c21ec Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 18 Nov 2011 13:57:41 -0800 Subject: Also fire changed_status when the status text changes for a resource. --- sleekxmpp/roster/item.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/roster') diff --git a/sleekxmpp/roster/item.py b/sleekxmpp/roster/item.py index c27f7a78..4f4663d3 100644 --- a/sleekxmpp/roster/item.py +++ b/sleekxmpp/roster/item.py @@ -345,9 +345,10 @@ class RosterItem(object): self.xmpp.event('got_online', presence) if resource not in self.resources: self.resources[resource] = {} + old_status = self.resources[resource].get('status', '') old_show = self.resources[resource].get('show', None) self.resources[resource].update(data) - if old_show != presence['show']: + if old_show != presence['show'] or old_status != presence['status']: self.xmpp.event('changed_status', presence) def handle_unavailable(self, presence): -- cgit v1.2.3