updated plugin ActivityPub version 0.13.4

This commit is contained in:
2022-08-19 16:15:51 +00:00
committed by Gitium
parent a3483bf62f
commit b49569de47
14 changed files with 149 additions and 71 deletions

View File

@ -21,7 +21,9 @@ class Followers {
*/
public static function register_routes() {
\register_rest_route(
'activitypub/1.0', '/users/(?P<user_id>\d+)/followers', array(
'activitypub/1.0',
'/users/(?P<user_id>\d+)/followers',
array(
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( '\Activitypub\Rest\Followers', 'get' ),
@ -44,12 +46,16 @@ class Followers {
$user = \get_user_by( 'ID', $user_id );
if ( ! $user ) {
return new \WP_Error( 'rest_invalid_param', \__( 'User not found', 'activitypub' ), array(
'status' => 404,
'params' => array(
'user_id' => \__( 'User not found', 'activitypub' ),
),
) );
return new \WP_Error(
'rest_invalid_param',
\__( 'User not found', 'activitypub' ),
array(
'status' => 404,
'params' => array(
'user_id' => \__( 'User not found', 'activitypub' ),
),
)
);
}
/*