mirror of https://gitlab.com/bashrc2/epicyon
Show handle as title on announced display name
parent
e32be2f671
commit
f201517ab9
|
@ -1350,7 +1350,8 @@ def _announce_unattributed_html(translate: {},
|
||||||
def _announce_with_display_name_html(translate: {},
|
def _announce_with_display_name_html(translate: {},
|
||||||
post_json_object: {},
|
post_json_object: {},
|
||||||
announce_display_name: str,
|
announce_display_name: str,
|
||||||
nickname: str) -> str:
|
nickname: str,
|
||||||
|
announce_handle: str) -> str:
|
||||||
"""Returns html for an announce having a display name
|
"""Returns html for an announce having a display name
|
||||||
"""
|
"""
|
||||||
announces_str = 'announces'
|
announces_str = 'announces'
|
||||||
|
@ -1365,8 +1366,8 @@ def _announce_with_display_name_html(translate: {},
|
||||||
'icons/repeat_inactive.png" ' + \
|
'icons/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + post_link + '" ' + \
|
' <a href="' + post_link + '" ' + \
|
||||||
'class="announceOrReply" tabindex="10">' + \
|
'class="announceOrReply" tabindex="10" title="' + \
|
||||||
'<span itemprop="author">' + \
|
announce_handle + '">' + '<span itemprop="author">' + \
|
||||||
announce_display_name + '</span></a>\n'
|
announce_display_name + '</span></a>\n'
|
||||||
|
|
||||||
|
|
||||||
|
@ -1422,6 +1423,9 @@ def _get_post_title_announce_html(base_dir: str,
|
||||||
|
|
||||||
announce_domain, _ = get_domain_from_actor(attributed_to)
|
announce_domain, _ = get_domain_from_actor(attributed_to)
|
||||||
get_person_from_cache(base_dir, attributed_to, person_cache)
|
get_person_from_cache(base_dir, attributed_to, person_cache)
|
||||||
|
announce_handle = ''
|
||||||
|
if announce_nickname and announce_domain:
|
||||||
|
announce_handle = announce_nickname + '@' + announce_domain
|
||||||
announce_display_name = \
|
announce_display_name = \
|
||||||
get_display_name(base_dir, attributed_to, person_cache)
|
get_display_name(base_dir, attributed_to, person_cache)
|
||||||
if announce_display_name:
|
if announce_display_name:
|
||||||
|
@ -1433,7 +1437,7 @@ def _get_post_title_announce_html(base_dir: str,
|
||||||
announce_display_name = \
|
announce_display_name = \
|
||||||
_enforce_max_display_name_length(announce_display_name)
|
_enforce_max_display_name_length(announce_display_name)
|
||||||
if not announce_display_name and announce_domain:
|
if not announce_display_name and announce_domain:
|
||||||
announce_display_name = announce_nickname + '@' + announce_domain
|
announce_display_name = announce_handle
|
||||||
|
|
||||||
_log_post_timing(enable_timing_log, post_start_time, '13.3')
|
_log_post_timing(enable_timing_log, post_start_time, '13.3')
|
||||||
|
|
||||||
|
@ -1448,7 +1452,7 @@ def _get_post_title_announce_html(base_dir: str,
|
||||||
title_str += \
|
title_str += \
|
||||||
_announce_with_display_name_html(translate, post_json_object,
|
_announce_with_display_name_html(translate, post_json_object,
|
||||||
announce_display_name,
|
announce_display_name,
|
||||||
nickname)
|
nickname, announce_handle)
|
||||||
|
|
||||||
if mitm:
|
if mitm:
|
||||||
title_str += _mitm_warning_html(translate)
|
title_str += _mitm_warning_html(translate)
|
||||||
|
|
Loading…
Reference in New Issue