diff --git a/includes/rest/class-followers.php b/includes/rest/class-followers.php index 03d3c2a..a07514e 100644 --- a/includes/rest/class-followers.php +++ b/includes/rest/class-followers.php @@ -69,7 +69,7 @@ class Followers { $json->{'@context'} = \Activitypub\get_context(); - $json->id = \home_url( \add_query_arg( null, null ) ); + $json->id = get_rest_url_by_path( sprintf( 'users/%d/followers', $user->get__id() ) ); $json->generator = 'http://wordpress.org/?v=' . \get_bloginfo_rss( 'version' ); $json->actor = $user->get_id(); $json->type = 'OrderedCollectionPage'; diff --git a/includes/rest/class-following.php b/includes/rest/class-following.php index cd77007..f212677 100644 --- a/includes/rest/class-following.php +++ b/includes/rest/class-following.php @@ -62,7 +62,7 @@ class Following { $json->{'@context'} = \Activitypub\get_context(); - $json->id = \home_url( \add_query_arg( null, null ) ); + $json->id = get_rest_url_by_path( sprintf( 'users/%d/following', $user->get__id() ) ); $json->generator = 'http://wordpress.org/?v=' . \get_bloginfo_rss( 'version' ); $json->actor = $user->get_id(); $json->type = 'OrderedCollectionPage'; diff --git a/includes/rest/class-inbox.php b/includes/rest/class-inbox.php index f3df5c9..d45395c 100644 --- a/includes/rest/class-inbox.php +++ b/includes/rest/class-inbox.php @@ -90,7 +90,7 @@ class Inbox { $json = new \stdClass(); $json->{'@context'} = get_context(); - $json->id = \home_url( \add_query_arg( null, null ) ); + $json->id = get_rest_url_by_path( sprintf( 'users/%d/inbox', $user->get__id() ) ); $json->generator = 'http://wordpress.org/?v=' . \get_bloginfo_rss( 'version' ); $json->type = 'OrderedCollectionPage'; $json->partOf = get_rest_url_by_path( sprintf( 'users/%d/inbox', $user->get__id() ) ); // phpcs:ignore diff --git a/includes/rest/class-outbox.php b/includes/rest/class-outbox.php index a0d06a9..b7ff095 100644 --- a/includes/rest/class-outbox.php +++ b/includes/rest/class-outbox.php @@ -71,7 +71,7 @@ class Outbox { $json = new stdClass(); $json->{'@context'} = get_context(); - $json->id = \home_url( \add_query_arg( null, null ) ); + $json->id = get_rest_url_by_path( sprintf( 'users/%d/outbox', $user_id ) ); $json->generator = 'http://wordpress.org/?v=' . \get_bloginfo_rss( 'version' ); $json->actor = $user->get_id(); $json->type = 'OrderedCollectionPage';