function createComment
createComment(
dumpId: string,
userId: string,
body: string,
parentId?: string
): Comment

Posts a comment on dump dumpId, replying to parentId if given, for POST /api/dumps/:dumpId/comments. It notifies the dump's poster and the users it mentions, unless the dump is private, and links the comment's attachments and backlinks. The route has checked that the caller may see the dump.

Parameters

dumpId: string
userId: string
body: string
optional
parentId: string

Return Type

Throws

APIException

400 when parentId isn't a comment on the same dump.

Usage

import { createComment } from "api/services/comment-service.ts";