Skip to content

Commit

Permalink
Use should_be_federated() instead
Browse files Browse the repository at this point in the history
See #1186.
  • Loading branch information
obenland committed Jan 21, 2025
1 parent 9433ce8 commit 0919027
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/transformer/class-factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
namespace Activitypub\Transformer;

use WP_Error;
use Activitypub\Comment as Comment_Helper;

use function Activitypub\is_user_disabled;
use function Activitypub\is_post_disabled;
use function Activitypub\is_local_comment;

/**
* Transformer Factory.
*/
Expand Down Expand Up @@ -84,7 +85,7 @@ public static function get_transformer( $data ) {
}
break;
case 'WP_Comment':
if ( ! is_local_comment( $data ) ) {
if ( Comment_Helper::should_be_federated( $data ) ) {
return new Comment( $data );
}
break;
Expand Down

0 comments on commit 0919027

Please sign in to comment.