From 7c817decf24cb01923e8696dbb6c10c1562baf40 Mon Sep 17 00:00:00 2001 From: freamon Date: Mon, 6 Jan 2025 22:54:41 +0000 Subject: [PATCH] misc bugfixes for PeerTube --- app/activitypub/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/activitypub/util.py b/app/activitypub/util.py index 90079538..6b0da9ff 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -1784,6 +1784,7 @@ def update_post_from_activity(post: Post, request_json: dict): if request_json['object']['type'] == 'Video': # 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) + db.session.commit() return # Links @@ -2517,7 +2518,7 @@ def verify_object_from_source(request_json): if isinstance(object['attributedTo'], str): 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 else: return None