dont_at_me emoji can appear within summary

main
Bob Mottram 2022-05-30 14:11:33 +01:00
parent 611c6cab17
commit 937225acc7
2 changed files with 12 additions and 4 deletions

View File

@ -1774,7 +1774,10 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
post_content = '' post_content = ''
if post_json_object['object'].get('content'): if post_json_object['object'].get('content'):
post_content = post_json_object['object']['content'] post_content = post_json_object['object']['content']
if not disallow_reply(post_content): post_summary = ''
if post_json_object['object'].get('summary'):
post_summary = post_json_object['object']['summary']
if not disallow_reply(post_summary + ' ' + post_content):
if post_json_object.get('id'): if post_json_object.get('id'):
post_id = post_json_object['id'] post_id = post_json_object['id']
subject = None subject = None

View File

@ -2057,6 +2057,7 @@ def individual_post_as_html(signing_priv_key_pem: str,
if not content_str: if not content_str:
return '' return ''
summary_str = ''
if content_str: if content_str:
# does an emoji indicate a no boost preference? # does an emoji indicate a no boost preference?
# if so then don't show the repeat/announce icon # if so then don't show the repeat/announce icon
@ -2064,7 +2065,10 @@ def individual_post_as_html(signing_priv_key_pem: str,
announce_str = '' announce_str = ''
# does an emoji indicate a no replies preference? # does an emoji indicate a no replies preference?
# if so then don't show the reply icon # if so then don't show the reply icon
if disallow_reply(content_str): summary_str = get_summary_from_post(post_json_object, system_language,
languages_understood)
content_all_str = str(summary_str) + ' ' + content_str
if disallow_reply(content_all_str):
reply_str = '' reply_str = ''
new_footer_str = \ new_footer_str = \
@ -2083,8 +2087,9 @@ def individual_post_as_html(signing_priv_key_pem: str,
if post_is_sensitive: if post_is_sensitive:
footer_str = '<br>' + footer_str footer_str = '<br>' + footer_str
summary_str = get_summary_from_post(post_json_object, system_language, if not summary_str:
languages_understood) summary_str = get_summary_from_post(post_json_object, system_language,
languages_understood)
is_patch = is_git_patch(base_dir, nickname, domain, is_patch = is_git_patch(base_dir, nickname, domain,
post_json_object['object']['type'], post_json_object['object']['type'],
summary_str, content_str) summary_str, content_str)