From 0b3974b2556595ea68fdb206910800fa1c1bd3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 11 Sep 2024 13:50:57 +0200 Subject: [PATCH] fix base event transformer for activitypub 3.2+ --- includes/activitypub/transformer/class-event.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/activitypub/transformer/class-event.php b/includes/activitypub/transformer/class-event.php index c7b508f..02eda0c 100644 --- a/includes/activitypub/transformer/class-event.php +++ b/includes/activitypub/transformer/class-event.php @@ -9,7 +9,6 @@ namespace Activitypub_Event_Extensions\Activitypub\Transformer; use Activitypub\Activity\Extended_Object\Event as Event_Object; -use Activitypub\Model\Blog; use Activitypub\Transformer\Post; use function Activitypub\get_rest_url_by_path; @@ -102,12 +101,11 @@ class Event extends Post { $this->get_locale() => $this->get_content(), ) ); - $path = sprintf( 'actors/%d/followers', intval( $this->wp_object->post_author ) ); $activitypub_object->set_to( array( 'https://www.w3.org/ns/activitystreams#Public', - get_rest_url_by_path( $path ), + $this->get_actor_object()->get_followers(), ) );