mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
* clean up offline contacts
This commit is contained in:
parent
1fa1f7dcc6
commit
6be17ebbe2
1 changed files with 4 additions and 0 deletions
|
@ -419,6 +419,10 @@ class basexmpp(object):
|
|||
self.event("got_online", eventdata)
|
||||
elif not wasoffline and show == 'unavailable':
|
||||
self.event("got_offline", eventdata)
|
||||
if len(self.roster[jid]['presence']) > 1:
|
||||
del self.roster[jid]['presence'][resource]
|
||||
else:
|
||||
del self.roster[jid]
|
||||
elif oldroster != self.roster.get(jid, {'presence': {}})['presence'].get(resource, {}) and show != 'unavailable':
|
||||
self.event("changed_status", eventdata)
|
||||
name = ''
|
||||
|
|
Loading…
Reference in a new issue