summaryrefslogtreecommitdiff
path: root/sleekxmpp/basexmpp.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-02-15 15:45:57 -0800
committerNathan Fritz <fritzy@netflint.net>2010-02-15 15:45:57 -0800
commitac1d76b23d7d4137b175e85fbabae94d663a9773 (patch)
tree7d1baa731f7faef535f993c430f6fa82fd9946ae /sleekxmpp/basexmpp.py
parent5e736f4b978414c111062ffb220e38eb40765db6 (diff)
downloadslixmpp-ac1d76b23d7d4137b175e85fbabae94d663a9773.tar.gz
slixmpp-ac1d76b23d7d4137b175e85fbabae94d663a9773.tar.bz2
slixmpp-ac1d76b23d7d4137b175e85fbabae94d663a9773.tar.xz
slixmpp-ac1d76b23d7d4137b175e85fbabae94d663a9773.zip
tweaked presence handler
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r--sleekxmpp/basexmpp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index 100bef90..26e513a4 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -267,7 +267,7 @@ class basexmpp(object):
wasoffline = True
self.roster[jid]['presence'][resource] = {'show': show, 'status': status, 'priority': priority}
else:
- if self.roster[jid]['presence'][resource].get('show', None) == 'unavailable':
+ if self.roster[jid]['presence'][resource].get('show', 'unavailable') == 'unavailable':
wasoffline = True
self.roster[jid]['presence'][resource] = {'show': show, 'status': status}
self.roster[jid]['presence'][resource]['priority'] = priority
@@ -276,6 +276,7 @@ class basexmpp(object):
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: