comments module lets you create, fetch, update, and delete comments, and manage reactions on them. All actions are performed on behalf of the logged-in user.
createComment
Creates a comment on an entity. Optionally a reply, with a GIF, mentions, attachments, or metadata.Promise<Comment>
fetchComment
Fetches a single comment by its ID.Promise<Comment>
fetchCommentByForeignId
Fetches a comment by your application’s own identifier.Promise<Comment>
updateComment
Updates a comment’s content.Promise<Comment>
deleteComment
Deletes a comment.Promise<void>
fetchManyComments
Fetches a paginated list of comments, filterable by entity, user, or parent.Sort order:
"createdAt" (newest first; honors sortDir), "top", or "controversial". "new" and "old" are deprecated aliases for "createdAt" (removed in v8) — the server still accepts them but responds with a deprecation header.How to treat comments authored by users the viewer is block-edged with.
"exclude" (default) hides them; "include-outbound-blocked" re-includes only the viewer’s own outbound-blocked authors — never content from users who blocked the viewer. No effect without the moderation bundle.Promise<PaginatedResponse<Comment>>
addReaction
Adds the logged-in user’s reaction to a comment and returns the full populated comment.Promise<Comment>
removeReaction
Removes the logged-in user’s reaction from a comment and returns the full populated comment.Promise<Comment>
fetchReactions
Fetches a paginated list of reactions on a comment, optionally filtered by reaction type.Promise<{ data: Reaction[]; pagination: { page: number; limit: number; total: number; totalPages: number; hasMore: boolean } }>
getUserReaction
Gets the logged-in user’s reaction on a comment. Returnsnull if there is no reaction.
Promise<{ reactionType: ReactionType | null }>
