clean common.contacts._contacts when we remove a contact. Fixes #1788

This commit is contained in:
Yann Leboulanger 2006-03-31 17:54:52 +00:00
parent ff5fd60861
commit d0f7758647
1 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,8 @@ class Contacts:
return
if contact in self._contacts[account][contact.jid]:
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):
'''Removes all contacts for a given jid'''