summaryrefslogtreecommitdiff
path: root/sleekxmpp/basexmpp.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-02-15 21:44:50 -0800
committerNathan Fritz <fritzy@netflint.net>2010-02-15 21:44:50 -0800
commited60867a63af204bbef350bb744c5923a389a2a8 (patch)
tree142c45e988431f5f17a5a794c15c19dace4c2acb /sleekxmpp/basexmpp.py
parent58375955a9b832356ba68cc1f9ecb3bc274b6922 (diff)
parent0dcbe92d1e49a9f009b39c39150307e3c15c9f9b (diff)
downloadslixmpp-ed60867a63af204bbef350bb744c5923a389a2a8.tar.gz
slixmpp-ed60867a63af204bbef350bb744c5923a389a2a8.tar.bz2
slixmpp-ed60867a63af204bbef350bb744c5923a389a2a8.tar.xz
slixmpp-ed60867a63af204bbef350bb744c5923a389a2a8.zip
Merge branch 'develop'
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: