mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
changed_status event now happens with got_offline/got_online events
This commit is contained in:
parent
09aae38117
commit
35c157f9d8
1 changed files with 2 additions and 0 deletions
|
@ -271,6 +271,7 @@ class basexmpp(object):
|
||||||
name = self.roster[jid].get('name', '')
|
name = self.roster[jid].get('name', '')
|
||||||
if wasoffline and (show == 'available' or show in presence.showtypes):
|
if wasoffline and (show == 'available' or show in presence.showtypes):
|
||||||
self.event("got_online", presence)
|
self.event("got_online", presence)
|
||||||
|
self.event("changed_status", presence)
|
||||||
elif show == 'unavailable':
|
elif show == 'unavailable':
|
||||||
logging.debug("%s %s got offline" % (jid, resource))
|
logging.debug("%s %s got offline" % (jid, resource))
|
||||||
if len(self.roster[jid]['presence']) > 1:
|
if len(self.roster[jid]['presence']) > 1:
|
||||||
|
@ -278,6 +279,7 @@ class basexmpp(object):
|
||||||
else:
|
else:
|
||||||
del self.roster[jid]
|
del self.roster[jid]
|
||||||
self.event("got_offline", presence)
|
self.event("got_offline", presence)
|
||||||
|
self.event("changed_status", presence)
|
||||||
elif oldroster != self.roster.get(jid, {'presence': {}})['presence'].get(resource, {}):
|
elif oldroster != self.roster.get(jid, {'presence': {}})['presence'].get(resource, {}):
|
||||||
self.event("changed_status", presence)
|
self.event("changed_status", presence)
|
||||||
name = ''
|
name = ''
|
||||||
|
|
Loading…
Reference in a new issue