Skip to content

Commit

Permalink
use pending instead of draft
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Jan 20, 2025
1 parent ecbb777 commit 57a4199
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion includes/collection/class-outbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function add( $activity_object, $activity_type, $user_id, $content
'post_content' => $activity_object->to_json(),
// ensure that user ID is not below 0.
'post_author' => \max( $user_id, 0 ),
'post_status' => 'draft',
'post_status' => 'pending',
'meta_input' => array(
'_activitypub_activity_type' => $activity_type,
'_activitypub_activity_actor' => $actor,
Expand Down
2 changes: 1 addition & 1 deletion tests/includes/collection/class-test-outbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function test_add( $data, $type, $user_id, $json ) {
$post = get_post( $id );

$this->assertInstanceOf( 'WP_Post', $post );
$this->assertEquals( 'draft', $post->post_status );
$this->assertEquals( 'pending', $post->post_status );
$this->assertEquals( $json, $post->post_content );

$this->assertEquals( $type, get_post_meta( $id, '_activitypub_activity_type', true ) );
Expand Down
6 changes: 3 additions & 3 deletions tests/includes/rest/class-test-outbox-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function test_get_items_specific_user() {
array(
'post_author' => $user_id,
'post_type' => 'ap_outbox',
'post_status' => 'draft',
'post_status' => 'pending',
'post_title' => 'https://example.org/activity/1',
'post_content' => wp_json_encode(
array(
Expand Down Expand Up @@ -323,7 +323,7 @@ public function test_get_items_activity_type( $type, $activity, $allowed ) {
array(
'post_author' => $user_id,
'post_type' => Outbox::POST_TYPE,
'post_status' => 'draft',
'post_status' => 'pending',
'post_title' => "https://example.org/activity/{$type}",
'post_content' => \wp_json_encode(
array(
Expand Down Expand Up @@ -432,7 +432,7 @@ public function test_get_items_content_visibility( $visibility, $public_visible,
array(
'post_author' => $user_id,
'post_type' => Outbox::POST_TYPE,
'post_status' => 'draft',
'post_status' => 'pending',
'post_title' => 'https://example.org/activity/1',
'post_content' => \wp_json_encode(
array(
Expand Down

0 comments on commit 57a4199

Please sign in to comment.