implement FEP-2677: Identifying the Application Actor
Some checks failed
PHP_CodeSniffer / phpcs (push) Failing after 4m12s
Unit Testing / phpunit (5.6, 6.2) (push) Failing after 5m1s
Unit Testing / phpunit (7.0) (push) Failing after 4m47s
Unit Testing / phpunit (7.2) (push) Failing after 5m26s
Unit Testing / phpunit (7.3) (push) Failing after 5m43s
Unit Testing / phpunit (7.4) (push) Failing after 5m42s
Unit Testing / phpunit (8.0) (push) Failing after 5m43s
Unit Testing / phpunit (8.1) (push) Failing after 5m34s
Unit Testing / phpunit (8.2) (push) Failing after 5m43s
Unit Testing / phpunit (latest) (push) Failing after 5m19s

https://codeberg.org/fediverse/fep/src/branch/main/fep/2677/fep-2677.md
This commit is contained in:
André Menrath 2023-12-15 17:09:37 +01:00
parent 6819366b85
commit 957d9718f3

View file

@ -3,6 +3,9 @@ namespace Activitypub\Rest;
use WP_REST_Response; use WP_REST_Response;
use Activitypub\Collection\Users;
use Activitypub\Model\Application_User;
use function Activitypub\get_total_users; use function Activitypub\get_total_users;
use function Activitypub\get_active_users; use function Activitypub\get_active_users;
use function Activitypub\get_rest_url_by_path; use function Activitypub\get_rest_url_by_path;
@ -169,6 +172,10 @@ class Nodeinfo {
'rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.0', 'rel' => 'http://nodeinfo.diaspora.software/ns/schema/2.0',
'href' => get_rest_url_by_path( 'nodeinfo' ), '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 ); return new \WP_REST_Response( $discovery, 200 );