summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp')
-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 ''