diff --git a/includes/client/comments.php b/includes/client/comments.php new file mode 100644 index 0000000..88eabfa --- /dev/null +++ b/includes/client/comments.php @@ -0,0 +1,65 @@ +set_method( 'POST' ); + $request->set_body( wp_json_encode( $activity ) ); + $request->add_header( 'Content-Type', 'application/ld+json' ); + $server->dispatch( $request ); + } +} + +function get_comment_actor_slug( $comment ) { + if ( $comment->user_id !== 0 ) { + return get_comment_user_actor_slug( $comment->user_id ); + } else { + return get_comment_email_actor_slug( $comment->comment_author_email ); + } +} + +function get_comment_user_actor_slug( $user_id ) { + +} + +function get_comment_email_actor_slug( $email_address ) { + +} + +function comment_to_object( $comment ) { + +} + +function get_comment_to( $comment, $followers_id ) { + $to = array( + 'https://www.w3.org/ns/activitystreams#Public', + $followers_id, + ); + // TODO traverse comment reply chain to retrieve others to address to + return $to; +} +?>