From 957d9718f387fed97fc4adee2c5550bca6fa61e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Fri, 15 Dec 2023 17:09:37 +0100 Subject: [PATCH] implement FEP-2677: Identifying the Application Actor https://codeberg.org/fediverse/fep/src/branch/main/fep/2677/fep-2677.md --- includes/rest/class-nodeinfo.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/rest/class-nodeinfo.php b/includes/rest/class-nodeinfo.php index 62151ff..b066214 100644 --- a/includes/rest/class-nodeinfo.php +++ b/includes/rest/class-nodeinfo.php @@ -3,6 +3,9 @@ namespace Activitypub\Rest; use WP_REST_Response; +use Activitypub\Collection\Users; +use Activitypub\Model\Application_User; + use function Activitypub\get_total_users; use function Activitypub\get_active_users; use function Activitypub\get_rest_url_by_path; @@ -169,6 +172,10 @@ class Nodeinfo { 'rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.0', 'href' => get_rest_url_by_path( 'nodeinfo' ), ), + array( + 'rel' => 'https://www.w3.org/ns/activitystreams#Application', + 'href' => Application_User::from_wp_user( Users::APPLICATION_USER_ID )->get_url(), + ), ); return new \WP_REST_Response( $discovery, 200 );