Check field types

main
Bob Mottram 2022-12-24 17:48:09 +00:00
parent 1b5143f4da
commit 63083b1a1f
1 changed files with 4 additions and 0 deletions

View File

@ -4146,8 +4146,12 @@ def is_quote_toot(post_json_object: str) -> bool:
continue
if not item.get('mediaType'):
continue
if not isinstance(item['type'], str):
continue
if item['type'] != 'Link':
continue
if not isinstance(item['mediaType'], str):
continue
if 'json' not in item['mediaType']:
continue
return True