guid, $remote_followers, true ); if ( false === $key ) { Following::reject( $following, $user_id ); } else { unset( $remote_followers[ $key ] ); } } $remote_followers = array_values( $remote_followers ); // Reindex. $pending = Following::get_by_authority( $user_id, $home_authority, Following::PENDING_META_KEY ); foreach ( $pending as $following ) { $key = array_search( $following->guid, $remote_followers, true ); if ( false === $key ) { Following::reject( $following, $user_id ); } else { Following::accept( $following, $user_id ); unset( $remote_followers[ $key ] ); } } /** * Action triggered after reconciliation is complete. * * @param int $user_id The local user ID that triggered the reconciliation. * @param string $actor_url The remote actor URL. */ \do_action( 'activitypub_followers_sync_reconciled', $user_id, $actor_url ); } }