small improvements
This commit is contained in:
parent
09518ea66b
commit
03f2c24892
6 changed files with 10 additions and 6 deletions
|
@ -39,7 +39,7 @@ function init() {
|
|||
Collection\Followers::init();
|
||||
|
||||
// Configure the REST API route
|
||||
Rest\User::init();
|
||||
Rest\Users::init();
|
||||
Rest\Outbox::init();
|
||||
Rest\Inbox::init();
|
||||
Rest\Followers::init();
|
||||
|
|
|
@ -97,6 +97,7 @@ class Activitypub {
|
|||
return $template;
|
||||
}
|
||||
}
|
||||
|
||||
return $json_template;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,4 +88,8 @@ class Blog_User extends User {
|
|||
|
||||
return \gmdate( 'Y-m-d\TH:i:s\Z', $time );
|
||||
}
|
||||
|
||||
public function get_public_key() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ namespace Activitypub\Model;
|
|||
|
||||
use WP_Query;
|
||||
use WP_Error;
|
||||
use Activitypub\Signature;
|
||||
use Activitypub\Model\User;
|
||||
use Activitypub\User_Factory;
|
||||
|
||||
|
@ -121,8 +122,7 @@ class User {
|
|||
}
|
||||
|
||||
public function get_public_key() {
|
||||
//return Signature::get_public_key( $this->user_id );
|
||||
return null;
|
||||
return Signature::get_public_key( $this->user_id );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@ use Activitypub\User_Factory;
|
|||
*
|
||||
* @see https://www.w3.org/TR/activitypub/#followers
|
||||
*/
|
||||
class User {
|
||||
class Users {
|
||||
/**
|
||||
* Initialize the class, registering WordPress hooks
|
||||
*/
|
|
@ -47,8 +47,7 @@ class Webfinger {
|
|||
*/
|
||||
public static function webfinger( $request ) {
|
||||
$resource = $request->get_param( 'resource' );
|
||||
|
||||
$user = User_Factory::get_by_resource( $resource );
|
||||
$user = User_Factory::get_by_resource( $resource );
|
||||
|
||||
if ( is_wp_error( $user ) ) {
|
||||
return $user;
|
||||
|
|
Loading…
Reference in a new issue