Skip to content

Commit 183e5da

Browse files
committed
Add follow activity to outbox with private visibility
Introduces a call to add_to_outbox when creating a follow activity, ensuring it is added with private visibility. This helps manage the visibility of follow actions and improves activity tracking.
1 parent a55ace0 commit 183e5da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

includes/collection/class-following.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ 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+
9193
if ( ! $id || \is_wp_error( $id ) ) {
9294
return new \WP_Error( 'activitypub_follow_failed', 'Failed to add follow to outbox' );
9395
}

0 commit comments

Comments
 (0)