From f3665cd689e14cf4aa03391fe1ca07c24ca724ab Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 1 Apr 2008 23:13:10 +0000 Subject: [PATCH] don't remove metacontact when we reconnect. fixes #3771 --- src/common/contacts.py | 7 ++++--- src/roster_window.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/contacts.py b/src/common/contacts.py index 216c05f53..33ca5adde 100644 --- a/src/common/contacts.py +++ b/src/common/contacts.py @@ -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.''' diff --git a/src/roster_window.py b/src/roster_window.py index d338ab88e..d966a4c3d 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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]