diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index ee7458b1..13b29b47 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -1461,18 +1461,18 @@ def process_user_follow_request(request_json, activitypublog_id, remote_user_id) auto_accept = not local_user.ap_manually_approves_followers new_follower = UserFollower(local_user_id=local_user.id, remote_user_id=remote_user.id, is_accepted=auto_accept) if not local_user.ap_followers_url: - local_user.ap_followers_url = local_user.ap_public_url + '/followers' + local_user.ap_followers_url = local_user.public_url() + '/followers' db.session.add(new_follower) accept = { "@context": default_context(), - "actor": local_user.ap_profile_id, + "actor": local_user.public_url(), "to": [ - remote_user.ap_profile_id + remote_user.public_url() ], "object": { - "actor": remote_user.ap_profile_id, + "actor": remote_user.public_url(), "to": None, - "object": local_user.ap_profile_id, + "object": local_user.public_url(), "type": "Follow", "id": follow_id }, diff --git a/app/community/routes.py b/app/community/routes.py index d5328fba..3afc5353 100644 --- a/app/community/routes.py +++ b/app/community/routes.py @@ -760,12 +760,12 @@ def federate_post_to_user_followers(post): 'type': 'Note', 'id': post.ap_id, 'inReplyTo': None, - 'attributedTo': current_user.ap_profile_id, + 'attributedTo': current_user.public_url(), 'to': [ 'https://www.w3.org/ns/activitystreams#Public' ], 'cc': [ - current_user.ap_followers_url + current_user.followers_url() ], 'content': '', 'mediaType': 'text/html', @@ -783,12 +783,12 @@ def federate_post_to_user_followers(post): } create = { "id": f"https://{current_app.config['SERVER_NAME']}/activities/create/{gibberish(15)}", - "actor": current_user.ap_profile_id, + "actor": current_user.public_url(), "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ - current_user.ap_followers_url + current_user.followers_url() ], "type": "Create", "object": note, diff --git a/app/post/routes.py b/app/post/routes.py index ae34fed5..79bd5526 100644 --- a/app/post/routes.py +++ b/app/post/routes.py @@ -1109,12 +1109,12 @@ def federate_post_edit_to_user_followers(post): 'type': 'Note', 'id': post.ap_id, 'inReplyTo': None, - 'attributedTo': current_user.ap_profile_id, + 'attributedTo': current_user.public_url(), 'to': [ 'https://www.w3.org/ns/activitystreams#Public' ], 'cc': [ - current_user.ap_followers_url + current_user.followers_url() ], 'content': '', 'mediaType': 'text/html', @@ -1133,12 +1133,12 @@ def federate_post_edit_to_user_followers(post): } update = { "id": f"https://{current_app.config['SERVER_NAME']}/activities/create/{gibberish(15)}", - "actor": current_user.ap_profile_id, + "actor": current_user.public_url(), "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ - current_user.ap_followers_url + current_user.followers_url() ], "type": "Update", "object": note,