Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Feb 21, 2025
1 parent 583e0fa commit 334c649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion includes/class-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,8 @@ public function process_incoming_feed_items( array $items, User_Feed $user_feed

do_action( 'friends_retrieved_new_posts', $user_feed, $new_posts, $modified_posts, $friend_user );

$friend_user->delete_outdated_posts();
$deleted_posts = $friend_user->delete_outdated_posts();
$new_posts = array_diff( $new_posts, $deleted_posts );

return $new_posts;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test-activitypub.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public function test_dont_override_activitypub_mentions() {
'href' => $this->actor,
'name' => '@' . $this->friend_nicename,
),
$object->get_tag()
$object->get_tag() ?? array()
);

$this->assertContains( \get_rest_url( null, '/activitypub/1.0/users/1/followers' ), $object->get_cc() );
Expand Down

0 comments on commit 334c649

Please sign in to comment.