clear contact list when we connect. fixes #3234

This commit is contained in:
Yann Leboulanger 2007-08-09 23:04:02 +00:00
parent 44f4940c6c
commit 8976baecb3
2 changed files with 5 additions and 0 deletions

View File

@ -202,6 +202,9 @@ class Contacts:
if len(self._contacts[account][contact.jid]) == 0:
del self._contacts[account][contact.jid]
def clear_contacts(self, account):
self._contacts[account] = {}
def remove_jid(self, account, jid):
'''Removes all contacts for a given jid'''
if not self._contacts.has_key(account):

View File

@ -1223,6 +1223,8 @@ class RosterWindow:
gajim.contacts.add_account(account)
if not gajim.groups.has_key(account):
gajim.groups[account] = {}
# Empty contact list
gajim.contacts.clear_contacts(account)
for jid in array.keys():
jids = jid.split('/')
#get jid