updated plugin ActivityPub version 9.1.0
This commit is contained in:
@ -14,8 +14,6 @@ use Activitypub\Collection\Remote_Actors;
|
||||
use Activitypub\Http;
|
||||
use Activitypub\Webfinger;
|
||||
|
||||
use function Activitypub\is_actor;
|
||||
|
||||
/**
|
||||
* Proxy Controller.
|
||||
*
|
||||
@ -181,7 +179,10 @@ class Proxy_Controller extends \WP_REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// Fall back to fetching as a generic object.
|
||||
/*
|
||||
* Fall back to fetching as a generic object. Actors are already resolved and
|
||||
* cached above via fetch_by_various(), so this path only proxies the object.
|
||||
*/
|
||||
$object = Http::get_remote_object( $url );
|
||||
|
||||
if ( \is_wp_error( $object ) ) {
|
||||
@ -192,11 +193,6 @@ class Proxy_Controller extends \WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
// If it's an actor, store it for future use.
|
||||
if ( is_actor( $object ) ) {
|
||||
Remote_Actors::upsert( $object );
|
||||
}
|
||||
|
||||
$response = new \WP_REST_Response( $object, 200 );
|
||||
$response->header( 'Content-Type', 'application/activity+json; charset=' . \get_option( 'blog_charset' ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user