diff --git a/src/common/config.py b/src/common/config.py index b5fdad629..1432bdda3 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -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.')], 'log_contact_status_changes': [opt_bool, False], 'restored_messages_color': [opt_str, 'grey'], + 'hide_avatar_of_transport': [opt_bool, False], } __options_per_key = { diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 190607ade..652d2d8f8 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -433,6 +433,12 @@ def get_avatar_pixbuf_from_cache(jid): returns None if there is no image in 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''' + + 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): return 'ask'