check quote url

main
Bob Mottram 2024-04-20 13:33:43 +01:00
parent c8417c4296
commit f2550d0c67
1 changed files with 4 additions and 1 deletions

View File

@ -4763,7 +4763,10 @@ def get_quote_toot_url(post_json_object: str) -> str:
'toot:quoteReply', '_misskey_quote')
for fieldname in object_quote_url_fields:
if post_json_object['object'].get(fieldname):
return post_json_object['object'][fieldname]
quote_url = post_json_object['object'][fieldname]
if isinstance(quote_url, str):
if resembles_url(quote_url):
return remove_html(quote_url)
# More correct ActivityPub implementation - adding a Link tag
if post_json_object['object'].get('tag'):