mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
6bd3fff506
commit
8e6431fac5
4
quote.py
4
quote.py
|
|
@ -25,8 +25,10 @@ def get_quote_toot_url(post_json_object: str) -> str:
|
||||||
'_misskey_quote', 'quote'
|
'_misskey_quote', 'quote'
|
||||||
)
|
)
|
||||||
post_obj = post_json_object
|
post_obj = post_json_object
|
||||||
|
obj_exists = False
|
||||||
if has_object_dict(post_json_object):
|
if has_object_dict(post_json_object):
|
||||||
post_obj = post_json_object['object']
|
post_obj = post_json_object['object']
|
||||||
|
obj_exists = True
|
||||||
|
|
||||||
for fieldname in object_quote_url_fields:
|
for fieldname in object_quote_url_fields:
|
||||||
if not post_obj.get(fieldname):
|
if not post_obj.get(fieldname):
|
||||||
|
|
@ -38,7 +40,7 @@ def get_quote_toot_url(post_json_object: str) -> str:
|
||||||
|
|
||||||
# as defined by FEP-dd4b
|
# as defined by FEP-dd4b
|
||||||
# https://codeberg.org/fediverse/fep/src/branch/main/fep/dd4b/fep-dd4b.md
|
# https://codeberg.org/fediverse/fep/src/branch/main/fep/dd4b/fep-dd4b.md
|
||||||
if has_object_dict(post_json_object):
|
if obj_exists:
|
||||||
if ((post_json_object.get('content') or
|
if ((post_json_object.get('content') or
|
||||||
post_json_object.get('contentMap')) and
|
post_json_object.get('contentMap')) and
|
||||||
(not post_json_object['object'].get('content') and
|
(not post_json_object['object'].get('content') and
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue