updated plugin ActivityPub version 9.1.0

This commit is contained in:
2026-07-28 15:03:10 +00:00
committed by Gitium
parent bf428f0e45
commit ff806e1811
217 changed files with 6098 additions and 3025 deletions

View File

@ -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' ) );