diff --git a/.github/changelog/1515-from-description b/.github/changelog/1515-from-description new file mode 100644 index 000000000..30233c6b2 --- /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. diff --git a/includes/handler/class-create.php b/includes/handler/class-create.php index 6a33eb753..6017cf20f 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,9 @@ 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 ); + /** * Fires after a Create activity has been handled. *