In merged mode, don't add account name in roster if other contact is in same account. Use get_shown_name

so we don't print account name for all contacts with jid.split('@')[0]] as name
This commit is contained in:
Jean-Marie Traissard 2006-09-28 17:42:01 +00:00
parent 2439915136
commit 99f8b6aee9
1 changed files with 5 additions and 1 deletions

View File

@ -492,10 +492,14 @@ class RosterWindow:
add_acct = False
# look through all contacts of all accounts
for a in gajim.connections:
if a == account: # useless to add accout name
continue
for j in gajim.contacts.get_jid_list(a):
# [0] cause it'fster than highest_prio
c = gajim.contacts.get_first_contact_from_jid(a, j)
if c.name == contact.name and (j, a) != (jid, account):
if c.get_shown_name() == \
contact.get_shown_name() and\
(j, a) != (jid, account):
add_acct = True
break
if add_acct: