Skip to content
Snippets Groups Projects
Commit 50f1567b authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

check we have a cached vcard before looking in it. Fixes #5670

parent c6389dec
No related branches found
No related tags found
No related merge requests found
......@@ -1342,11 +1342,11 @@ def get_subscription_request_msg(account=None):
our_jid = gajim.get_jid_from_account(account)
vcard = gajim.connections[account].get_cached_vcard(our_jid)
name = ''
if 'N' in vcard:
if 'GIVEN' in vcard['N'] and 'FAMILY' in vcard['N']:
name = vcard['N']['GIVEN'] + ' ' + vcard['N']['FAMILY']
if not name:
if 'FN' in vcard:
if vcard:
if 'N' in vcard:
if 'GIVEN' in vcard['N'] and 'FAMILY' in vcard['N']:
name = vcard['N']['GIVEN'] + ' ' + vcard['N']['FAMILY']
if not name and 'FN' in vcard:
name = vcard['FN']
nick = gajim.nicks[account]
if name and nick:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment