diff options
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r-- | sleekxmpp/basexmpp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index 92f1f9a6..91620731 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -279,15 +279,15 @@ class basexmpp(object): self.roster[jid]['presence'][resource] = {'show': show, 'status': status} self.roster[jid]['presence'][resource]['priority'] = priority name = self.roster[jid].get('name', '') - if wasoffline and show in ('available', 'away', 'xa', 'na', 'ffc'): + if wasoffline and (show == 'available' or show in presence.showtypes): self.event("got_online", presence) elif not wasoffline and show == 'unavailable': - self.event("got_offline", presence) logging.debug("%s %s got offline" % (jid, resource)) if len(self.roster[jid]['presence']) > 1: del self.roster[jid]['presence'][resource] else: del self.roster[jid] + self.event("got_offline", presence) elif oldroster != self.roster.get(jid, {'presence': {}})['presence'].get(resource, {}): self.event("changed_status", presence) name = '' |