mirror of https://gitlab.com/bashrc2/epicyon
Extra quote toot style
parent
fea2ddbde9
commit
734e78fcd3
10
utils.py
10
utils.py
|
@ -4220,6 +4220,16 @@ def is_quote_toot(post_json_object: str, content: str) -> bool:
|
||||||
for item in post_json_object['object']['tag']:
|
for item in post_json_object['object']['tag']:
|
||||||
if not isinstance(item, dict):
|
if not isinstance(item, dict):
|
||||||
continue
|
continue
|
||||||
|
if item.get('rel'):
|
||||||
|
if isinstance(item['rel'], list):
|
||||||
|
for rel_str in item['rel']:
|
||||||
|
if not isinstance(rel_str, str):
|
||||||
|
continue
|
||||||
|
if '_misskey_quote' in rel_str:
|
||||||
|
return True
|
||||||
|
elif isinstance(item['rel'], str):
|
||||||
|
if '_misskey_quote' in item['rel']:
|
||||||
|
return True
|
||||||
if not item.get('type'):
|
if not item.get('type'):
|
||||||
continue
|
continue
|
||||||
if not item.get('mediaType'):
|
if not item.get('mediaType'):
|
||||||
|
|
Loading…
Reference in New Issue