From e827221ee6b13ea4839fe920843b1fce12ea0e9b Mon Sep 17 00:00:00 2001 From: Django Doucet Date: Fri, 5 May 2023 12:09:12 -0600 Subject: [PATCH] service actor as application actor --- includes/rest/class-server.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/rest/class-server.php b/includes/rest/class-server.php index 5934bcf..6ee28d5 100644 --- a/includes/rest/class-server.php +++ b/includes/rest/class-server.php @@ -27,11 +27,11 @@ class Server { public static function register_routes() { \register_rest_route( 'activitypub/1.0', - '/service', + '/application', array( array( 'methods' => \WP_REST_Server::READABLE, - 'callback' => array( self::class, 'service_actor' ), + 'callback' => array( self::class, 'application_actor' ), 'permission_callback' => '__return_true', ), ) @@ -39,24 +39,24 @@ class Server { } /** - * Render Service actor profile + * Render Application actor profile * * @return WP_REST_Response */ - public static function service_actor() { + public static function application_actor() { $json = new \stdClass(); $json->{'@context'} = \Activitypub\get_context(); - $json->id = \get_rest_url( null, 'activitypub/1.0/service' ); + $json->id = \get_rest_url( null, 'activitypub/1.0/application' ); $json->type = 'Application'; $json->preferredUsername = parse_url( get_site_url(), PHP_URL_HOST ); $json->name = get_bloginfo( 'name' ); - $json->summary = "ActivityPub service actor"; + $json->summary = "WordPress-ActivityPub application actor"; $json->manuallyApprovesFollowers = TRUE; $json->icon = [ get_site_icon_url() ]; $json->publicKey = (object) array( - 'id' => \get_rest_url( null, 'activitypub/1.0/service#main-key' ), - 'owner' => \get_rest_url( null, 'activitypub/1.0/service' ), + 'id' => \get_rest_url( null, 'activitypub/1.0/application#main-key' ), + 'owner' => \get_rest_url( null, 'activitypub/1.0/application' ), 'publicKeyPem' => Signature::get_public_key( -1 ), );