From f368d5d000a1addb71a536a146554f9a2cd3660c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 19 Jan 2023 10:24:55 +0000 Subject: [PATCH] Use url if available --- webapp_post.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index ec269de67..0a7a5f0c5 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1210,7 +1210,11 @@ def _announce_unattributed_html(translate: {}, announces_str = 'announces' if translate.get(announces_str): announces_str = translate[announces_str] - post_id = remove_id_ending(post_json_object['object']['id']) + post_obj = post_json_object['object'] + if post_obj.get('url'): + post_id = post_obj['url'] + else: + post_id = remove_id_ending(post_obj['id']) post_link = '/users/' + nickname + '?convthread=' + \ post_id.replace('/', '--') return '