From d13661f5b7cc901148bd1ebfed25bc7e8b29d6d8 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 27 Mar 2025 11:48:31 -0500 Subject: [PATCH 1/3] Comment: Send announce for all new comments Fixes #1001. --- includes/handler/class-create.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/handler/class-create.php b/includes/handler/class-create.php index 6a33eb7535..08fe1d6111 100644 --- a/includes/handler/class-create.php +++ b/includes/handler/class-create.php @@ -9,6 +9,7 @@ use Activitypub\Collection\Interactions; +use function Activitypub\add_to_outbox; use function Activitypub\is_self_ping; use function Activitypub\is_activity_reply; use function Activitypub\is_activity_public; @@ -79,6 +80,8 @@ public static function handle_create( $activity, $user_id, $activity_object = nu $reaction = \get_comment( $state ); } + add_to_outbox( $activity, 'Announce', $user_id, ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); + /** * Fires after a Create activity has been handled. * From bc98e90d8e8615c618d2d267bedf8f57505144e4 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 27 Mar 2025 11:50:12 -0500 Subject: [PATCH 2/3] Add ticket reference for context --- includes/handler/class-create.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/handler/class-create.php b/includes/handler/class-create.php index 08fe1d6111..6017cf20fa 100644 --- a/includes/handler/class-create.php +++ b/includes/handler/class-create.php @@ -80,6 +80,7 @@ public static function handle_create( $activity, $user_id, $activity_object = nu $reaction = \get_comment( $state ); } + /* @ticket https://github.com/Automattic/wordpress-activitypub/issues/1001 */ add_to_outbox( $activity, 'Announce', $user_id, ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC ); /** From fa5796feeb090ff99673d670784e445148432350 Mon Sep 17 00:00:00 2001 From: Automattic Bot Date: Thu, 27 Mar 2025 18:53:01 +0200 Subject: [PATCH 3/3] Add changelog --- .github/changelog/1515-from-description | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/changelog/1515-from-description diff --git a/.github/changelog/1515-from-description b/.github/changelog/1515-from-description new file mode 100644 index 0000000000..30233c6b28 --- /dev/null +++ b/.github/changelog/1515-from-description @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Incoming comments create an Announce activity so other instances get notified about it.