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]