summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-10-24 18:56:50 -0400
committerLance Stout <lancestout@gmail.com>2010-10-24 18:56:50 -0400
commit8aa3d0c0476d3a704069d324c03d2703e5e2ad76 (patch)
treedcfcc031a940f31d060c6f3400e8dfb3876cfa94
parent9e3d506651e446992a31f66f11b64831f42fddbf (diff)
downloadslixmpp-8aa3d0c0476d3a704069d324c03d2703e5e2ad76.tar.gz
slixmpp-8aa3d0c0476d3a704069d324c03d2703e5e2ad76.tar.bz2
slixmpp-8aa3d0c0476d3a704069d324c03d2703e5e2ad76.tar.xz
slixmpp-8aa3d0c0476d3a704069d324c03d2703e5e2ad76.zip
Fixed got_offline triggering bug.
-rw-r--r--sleekxmpp/basexmpp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index 4ec0ac2a..bef4711e 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -593,8 +593,9 @@ class BaseXMPP(XMLStream):
if not connections and not self.roster[jid]['in_roster']:
del self.roster[jid]
- self.event("got_offline", presence)
- if was_offline:
+ if not was_offline:
+ self.event("got_offline", presence)
+ else:
return False
name = '(%s) ' % name if name else ''