Chat link at top of attachments

main
Bob Mottram 2023-07-10 11:53:20 +01:00
parent 63dc7e54e3
commit db870a7d6e
1 changed files with 2 additions and 3 deletions

View File

@ -1332,7 +1332,6 @@ def get_post_attachments_as_html(base_dir: str,
attachment_ctr = 0
attachment_str = ''
chat_link_str = ''
media_style_added = False
post_id = None
if post_json_object['object'].get('id'):
@ -1358,7 +1357,7 @@ def get_post_attachments_as_html(base_dir: str,
'://' not in attach['href'] or \
'.' not in attach['href']:
continue
chat_link_str += \
attachment_str += \
'<p><a href="' + attach['href'] + \
'" target="_blank" rel="nofollow noopener noreferrer">' + \
'💬 ' + translate['Chat'] + '</a></p>'
@ -1723,7 +1722,7 @@ def get_post_attachments_as_html(base_dir: str,
attachment_ctr += 1
if media_style_added:
attachment_str += '</div><br>'
return attachment_str + chat_link_str, gallery_str
return attachment_str, gallery_str
def html_post_separator(base_dir: str, column: str) -> str: