ACE: hide_avatar_of_transport
This commit is contained in:
parent
524866db6f
commit
42487409b3
2 changed files with 7 additions and 0 deletions
|
@ -163,6 +163,7 @@ class Config:
|
||||||
'print_status_in_chats': [opt_bool, True, _('If False, you will no longer see status line in chats when a contact changes his or her status and/or his status message.')],
|
'print_status_in_chats': [opt_bool, True, _('If False, you will no longer see status line in chats when a contact changes his or her status and/or his status message.')],
|
||||||
'log_contact_status_changes': [opt_bool, False],
|
'log_contact_status_changes': [opt_bool, False],
|
||||||
'restored_messages_color': [opt_str, 'grey'],
|
'restored_messages_color': [opt_str, 'grey'],
|
||||||
|
'hide_avatar_of_transport': [opt_bool, False],
|
||||||
}
|
}
|
||||||
|
|
||||||
__options_per_key = {
|
__options_per_key = {
|
||||||
|
|
|
@ -433,6 +433,12 @@ def get_avatar_pixbuf_from_cache(jid):
|
||||||
returns None if there is no image in vcard
|
returns None if there is no image in vcard
|
||||||
returns 'ask' if cached vcard should not be used (user changed his vcard,
|
returns 'ask' if cached vcard should not be used (user changed his vcard,
|
||||||
so we have new sha) or if we don't have the vcard'''
|
so we have new sha) or if we don't have the vcard'''
|
||||||
|
|
||||||
|
if gajim.config.get('hide_avatar_of_transport') and\
|
||||||
|
gajim.jid_is_transport(jid):
|
||||||
|
# don't show avatar for the transport itself
|
||||||
|
return None
|
||||||
|
|
||||||
if jid not in os.listdir(gajim.VCARDPATH):
|
if jid not in os.listdir(gajim.VCARDPATH):
|
||||||
return 'ask'
|
return 'ask'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue