don't synchronize groupchats when we synchronize contacts between 2 accounts. Fixes #5570

This commit is contained in:
Yann Leboulanger 2010-01-25 19:31:48 +01:00
parent faca096b56
commit bfded43d1e
2 changed files with 13 additions and 2 deletions

View File

@ -322,6 +322,9 @@ class LegacyContactsAPI:
def get_contacts_from_group(self, account, group):
return self._accounts[account].contacts.get_contacts_from_group(group)
def get_contacts_jid_list(self, account):
return self._accounts[account].contacts.get_contacts_jid_list()
def get_jid_list(self, account):
return self._accounts[account].contacts.get_jid_list()
@ -492,6 +495,13 @@ class Contacts():
def get_jid_list(self):
return self._contacts.keys()
def get_contacts_jid_list(self):
contacts = self._contacts.keys()
for jid in self._contacts.keys():
if self._contacts[jid][0].is_groupchat():
contacts.remove(jid)
return contacts
def get_contact_from_full_jid(self, fjid):
"""
Get Contact object for specific resource of given jid

View File

@ -2317,9 +2317,10 @@ class SynchroniseSelectContactsDialog:
model.clear()
# recover local contacts
local_jid_list = gajim.contacts.get_jid_list(self.local_account)
local_jid_list = gajim.contacts.get_contacts_jid_list(self.local_account)
remote_jid_list = gajim.contacts.get_jid_list(self.remote_account)
remote_jid_list = gajim.contacts.get_contacts_jid_list(
self.remote_account)
for remote_jid in remote_jid_list:
if remote_jid not in local_jid_list:
iter_ = model.append()