mirror of https://gitlab.com/bashrc2/epicyon
Convert expanded actor to id
parent
5e6bc8a86f
commit
3643e04064
|
@ -140,6 +140,12 @@ def _valid_profile_preview_post(post_json_object: {},
|
||||||
post_json_object['actor'] = post_json_object['actor']['id']
|
post_json_object['actor'] = post_json_object['actor']['id']
|
||||||
if not is_announced_feed_item:
|
if not is_announced_feed_item:
|
||||||
if has_object_dict(post_json_object):
|
if has_object_dict(post_json_object):
|
||||||
|
if post_json_object['object'].get('attributedTo'):
|
||||||
|
if isinstance(post_json_object['object']['attributedTo'],
|
||||||
|
dict):
|
||||||
|
if post_json_object['object']['attributedTo'].get('id'):
|
||||||
|
post_json_object['object']['attributedTo'] = \
|
||||||
|
post_json_object['object']['attributedTo']['id']
|
||||||
if post_json_object['actor'] != person_url and \
|
if post_json_object['actor'] != person_url and \
|
||||||
post_json_object['object']['type'] != 'Page':
|
post_json_object['object']['type'] != 'Page':
|
||||||
return False, None
|
return False, None
|
||||||
|
|
Loading…
Reference in New Issue