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,15 +216,16 @@ class Contacts:
def clear_contacts(self, 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'''
if not self._contacts.has_key(account):
return
if not self._contacts[account].has_key(jid):
return
del self._contacts[account][jid]
# remove metacontacts info
self.remove_metacontact(account, jid)
if remove_meta:
# remove metacontacts info
self.remove_metacontact(account, jid)
def get_contacts(self, account, jid):
'''Returns the list of contact instances for this jid.'''

View File

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