Also fire changed_status when the status text changes for a resource.

This commit is contained in:
Lance Stout
2011-11-18 13:57:41 -08:00
parent 22868c3924
commit d4c1ff5309
2 changed files with 35 additions and 3 deletions

View File

@@ -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):