diff --git a/includes/class-dispatcher.php b/includes/class-dispatcher.php index fe347d820..d3302b60d 100644 --- a/includes/class-dispatcher.php +++ b/includes/class-dispatcher.php @@ -106,10 +106,6 @@ private static function send_activity_to_followers( $activity, $actor_id, $outbo $inboxes = apply_filters( 'activitypub_send_to_inboxes', array(), $actor_id, $activity ); $inboxes = array_unique( $inboxes ); - if ( empty( $inboxes ) ) { - return; - } - $json = $activity->to_json(); foreach ( $inboxes as $inbox ) { diff --git a/tests/includes/class-test-dispatcher.php b/tests/includes/class-test-dispatcher.php index b0a1ffc90..4eeee4225 100644 --- a/tests/includes/class-test-dispatcher.php +++ b/tests/includes/class-test-dispatcher.php @@ -111,6 +111,10 @@ public function test_process_outbox() { Dispatcher::process_outbox( $outbox_item->ID ); + // Check that the outbox item is now published. + $outbox_item = \get_post( $outbox_item->ID ); + $this->assertEquals( 'publish', $outbox_item->post_status ); + remove_filter( 'activitypub_send_activity_to_followers', $test_callback ); } }