prevent loop when adding metacontact to roster

(fixes #1953 and maybe #1991)
This commit is contained in:
Dimitur Kirov 2006-05-24 18:17:51 +00:00
parent d440bdddab
commit 6953685979
1 changed files with 9 additions and 3 deletions

View File

@ -239,11 +239,17 @@ class RosterWindow:
# 'priority' is optional
family = gajim.contacts.get_metacontacts_family(account, jid)
shown_family = [] # family members that are in roster.
# family members that are in roster and belong to the same account.
shown_family = []
if family:
for data in family:
_jid = data['jid']
_account = data['account']
#XXX When we support metacontacts from different servers, make
# sure that loop from #1953 is fixed and remove next 2 lines!
if _account != account:
continue
_jid = data['jid']
if self.get_contact_iter(_jid, _account):
shown_family.append(data)
if _jid == jid: