Skip to content

Commit 33caee1

Browse files
pfefferleCopilot
andauthored
Update includes/collection/class-following.php
Co-authored-by: Copilot <[email protected]>
1 parent 0a25386 commit 33caee1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

includes/collection/class-following.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ public static function follow( $post, $user_id ) {
8888
$follow->set_object( $post->guid );
8989
$follow->set_to( array( $post->guid ) );
9090

91-
$id = add_to_outbox( $follow, null, $user_id, ACTIVITYPUB_CONTENT_VISIBILITY_PRIVATE );
92-
93-
if ( ! $id ) {
91+
if ( ! $id || \is_wp_error( $id ) ) {
9492
return new \WP_Error( 'activitypub_follow_failed', 'Failed to add follow to outbox' );
9593
}
9694
}

0 commit comments

Comments
 (0)