interface Comment

Returned by the comment routes, and sent in the comment_created and comment_updated WebSocket messages. It carries its author's name and avatar, so the thread needn't look them up.

Properties

id: string
dumpId: string
userId: string
optional
parentId: string

It is undefined on a top-level comment.

body: string

The Markdown text. Deleting the comment empties it.

optional
updatedAt: Date
deleted: boolean

A deleted comment stays in the thread, emptied, so its replies keep their place.

likeCount: number
optional
authorAvatarMime: string

Usage

import { type Comment } from "shared/comment.ts";