diff options
author | Brian Beggs <macdiesel@speakeasy.net> | 2010-05-14 10:59:41 -0400 |
---|---|---|
committer | Brian Beggs <macdiesel@speakeasy.net> | 2010-05-14 10:59:41 -0400 |
commit | 4b322720b39731d16fefedd8a77b3f9bb1684d7e (patch) | |
tree | 330e3a05f35675b0779060656156cefe320e27f2 /sleekxmpp/basexmpp.py | |
parent | 1521a8b5c9d656ef80a4caf3d7daa86f8f504423 (diff) | |
parent | 7522839141e7dd5bd081a421a58b0962b705fdda (diff) | |
download | slixmpp-4b322720b39731d16fefedd8a77b3f9bb1684d7e.tar.gz slixmpp-4b322720b39731d16fefedd8a77b3f9bb1684d7e.tar.bz2 slixmpp-4b322720b39731d16fefedd8a77b3f9bb1684d7e.tar.xz slixmpp-4b322720b39731d16fefedd8a77b3f9bb1684d7e.zip |
Merge remote branch 'tom/master'
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r-- | sleekxmpp/basexmpp.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index fef8538a..13fe2100 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -271,12 +271,13 @@ class basexmpp(object): name = self.roster[jid].get('name', '') if show == 'unavailable': logging.debug("%s %s got offline" % (jid, resource)) - if len(self.roster[jid]['presence']): - del self.roster[jid]['presence'][resource] - else: + del self.roster[jid]['presence'][resource] + if len(self.roster[jid]['presence']) == 0 and not self.roster[jid]['in_roster']: del self.roster[jid] if not wasoffline: self.event("got_offline", presence) + else: + return False self.event("changed_status", presence) name = '' if name: |