clean common.contacts._contacts when we remove a contact. Fixes #1788
This commit is contained in:
parent
ff5fd60861
commit
d0f7758647
|
@ -159,6 +159,8 @@ class Contacts:
|
||||||
return
|
return
|
||||||
if contact in self._contacts[account][contact.jid]:
|
if contact in self._contacts[account][contact.jid]:
|
||||||
self._contacts[account][contact.jid].remove(contact)
|
self._contacts[account][contact.jid].remove(contact)
|
||||||
|
if len(self._contacts[account][contact.jid]) == 0:
|
||||||
|
del self._contacts[account][contact.jid]
|
||||||
|
|
||||||
def remove_jid(self, account, jid):
|
def remove_jid(self, account, jid):
|
||||||
'''Removes all contacts for a given jid'''
|
'''Removes all contacts for a given jid'''
|
||||||
|
|
Loading…
Reference in New Issue