mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
misc bugfixes for PeerTube
This commit is contained in:
parent
af82bc7076
commit
7c817decf2
1 changed files with 2 additions and 1 deletions
|
@ -1784,6 +1784,7 @@ def update_post_from_activity(post: Post, request_json: dict):
|
||||||
if request_json['object']['type'] == 'Video':
|
if request_json['object']['type'] == 'Video':
|
||||||
# return now for PeerTube, otherwise rest of this function breaks the post
|
# return now for PeerTube, otherwise rest of this function breaks the post
|
||||||
# consider querying the Likes endpoint (that mostly seems to be what Updates are about)
|
# consider querying the Likes endpoint (that mostly seems to be what Updates are about)
|
||||||
|
db.session.commit()
|
||||||
return
|
return
|
||||||
|
|
||||||
# Links
|
# Links
|
||||||
|
@ -2517,7 +2518,7 @@ def verify_object_from_source(request_json):
|
||||||
|
|
||||||
if isinstance(object['attributedTo'], str):
|
if isinstance(object['attributedTo'], str):
|
||||||
actor_domain = urlparse(object['attributedTo']).netloc
|
actor_domain = urlparse(object['attributedTo']).netloc
|
||||||
elif isinstance(object['attributedTo'], list) and 'id' in object['attributedTo']:
|
elif isinstance(object['attributedTo'], dict) and 'id' in object['attributedTo']:
|
||||||
actor_domain = urlparse(object['attributedTo']['id']).netloc
|
actor_domain = urlparse(object['attributedTo']['id']).netloc
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in a new issue