Skip to content

Commit

Permalink
Outbox: Publish item after processing (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
obenland authored Jan 28, 2025
1 parent 65e7d32 commit 66007a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions includes/class-dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
4 changes: 4 additions & 0 deletions tests/includes/class-test-dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}

0 comments on commit 66007a5

Please sign in to comment.