clear contact list when we connect. fixes #3234
This commit is contained in:
parent
44f4940c6c
commit
8976baecb3
|
@ -202,6 +202,9 @@ class Contacts:
|
||||||
if len(self._contacts[account][contact.jid]) == 0:
|
if len(self._contacts[account][contact.jid]) == 0:
|
||||||
del self._contacts[account][contact.jid]
|
del self._contacts[account][contact.jid]
|
||||||
|
|
||||||
|
def clear_contacts(self, account):
|
||||||
|
self._contacts[account] = {}
|
||||||
|
|
||||||
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'''
|
||||||
if not self._contacts.has_key(account):
|
if not self._contacts.has_key(account):
|
||||||
|
|
|
@ -1223,6 +1223,8 @@ class RosterWindow:
|
||||||
gajim.contacts.add_account(account)
|
gajim.contacts.add_account(account)
|
||||||
if not gajim.groups.has_key(account):
|
if not gajim.groups.has_key(account):
|
||||||
gajim.groups[account] = {}
|
gajim.groups[account] = {}
|
||||||
|
# Empty contact list
|
||||||
|
gajim.contacts.clear_contacts(account)
|
||||||
for jid in array.keys():
|
for jid in array.keys():
|
||||||
jids = jid.split('/')
|
jids = jid.split('/')
|
||||||
#get jid
|
#get jid
|
||||||
|
|
Loading…
Reference in New Issue