don't remove metacontact when we reconnect. fixes #3771

This commit is contained in:
Yann Leboulanger 2008-04-01 23:13:10 +00:00
parent c497087115
commit f3665cd689
2 changed files with 5 additions and 4 deletions

View File

@ -216,13 +216,14 @@ class Contacts:
def clear_contacts(self, account): def clear_contacts(self, account):
self._contacts[account] = {} self._contacts[account] = {}
def remove_jid(self, account, jid): def remove_jid(self, account, jid, remove_meta=True):
'''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):
return return
if not self._contacts[account].has_key(jid): if not self._contacts[account].has_key(jid):
return return
del self._contacts[account][jid] del self._contacts[account][jid]
if remove_meta:
# remove metacontacts info # remove metacontacts info
self.remove_metacontact(account, jid) self.remove_metacontact(account, jid)

View File

@ -1294,7 +1294,7 @@ class RosterWindow:
gajim.groups[account] = {} gajim.groups[account] = {}
for jid in array.keys(): for jid in array.keys():
# Remove old Contact instances # Remove old Contact instances
gajim.contacts.remove_jid(account, jid) gajim.contacts.remove_jid(account, jid, remove_meta=False)
jids = jid.split('/') jids = jid.split('/')
# get jid # get jid
ji = jids[0] ji = jids[0]