updated plugin ActivityPub version 8.3.0

This commit is contained in:
2026-06-03 21:28:46 +00:00
committed by Gitium
parent a4b78ec277
commit 6fe182458a
340 changed files with 43232 additions and 7568 deletions

View File

@ -7,8 +7,8 @@
namespace Activitypub;
use Activitypub\Activity\Actor;
use Activitypub\Activity\Activity;
use Activitypub\Activity\Actor;
use Activitypub\Collection\Actors;
use Activitypub\Model\Blog;
use Activitypub\Model\User;
@ -65,7 +65,7 @@ class Move {
/**
* Move an ActivityPub Actor from one location (internal) to another (external).
*
* This helps migrating local profiles to a new external profile:
* This helps with migrating local profiles to a new external profile:
*
* `Move::externally( 'https://example.com/?author=123', 'https://mastodon.example/users/foo' );`
*
@ -119,7 +119,7 @@ class Move {
*
* Move an ActivityPub Actor from one location (internal) to another (internal).
*
* This helps migrating abandoned profiles to `Move` to other profiles:
* This helps with migrating abandoned profiles to `Move` to other profiles:
*
* `Move::internally( 'https://example.com/?author=123', 'https://example.com/?author=321' );`
*
@ -172,7 +172,6 @@ class Move {
* @param string $from The current account URL.
*/
private static function update_user_also_known_as( $user_id, $from ) {
// phpcs:ignore Universal.Operators.DisallowShortTernary.Found
$also_known_as = \get_user_option( 'activitypub_also_known_as', $user_id ) ?: array();
$also_known_as[] = $from;
@ -225,8 +224,15 @@ class Move {
$result = self::internally( $old_actor_id, $actor_id );
if ( \is_wp_error( $result ) ) {
// Log the error and continue with the next actor.
Debug::write_log( 'Error moving actor: ' . $actor_id . ' - ' . $result->get_error_message() );
/**
* Fires when an actor move fails during domain change.
*
* @since 8.1.0
*
* @param \WP_Error $result The error that occurred.
* @param string $actor_id The actor ID that failed to move.
*/
\do_action( 'activitypub_move_failed', $result, $actor_id );
continue;
}
@ -236,7 +242,7 @@ class Move {
if ( $actor instanceof Blog ) {
\update_option( 'activitypub_blog_user_old_host_data', $json, false );
} else {
\update_user_option( $actor->get__id(), 'activitypub_old_host_data', $json, false );
\update_user_option( $actor->get__id(), 'activitypub_old_host_data', $json );
}
$results[] = array(