From 41cfc46b96aa25649cc3ab204528b694b82bfaaa Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 16 Nov 2024 12:49:36 +0000 Subject: [PATCH] Link to the author's actor within html post --- webapp_post.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/webapp_post.py b/webapp_post.py index ade8f26c7..76c885a6c 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -3186,7 +3186,9 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int, message_id = remove_id_ending(post_json_object['id']) # show the previous posts + obj = post_json_object if has_object_dict(post_json_object): + obj = post_json_object['object'] post_id = True while post_id: if not post_json_object: @@ -3284,10 +3286,19 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int, system_language) if post_json_object.get('id'): # https://swicg.github.io/activitypub-html-discovery/#html-link-element + # link to the activitypub post post_id = remove_id_ending(post_json_object) metadata_str += \ ' ' + # link to the author's actor + if obj.get('attributedTo'): + actor = get_attributed_to(obj['attributedTo']) + if actor: + metadata_str += \ + ' ' preload_images = [] header_str = html_header_with_external_style(css_filename, instance_title, metadata_str,