interface ChatMessageItemProps

Passed to ChatMessageItem by ChatModal for each message row. The modal holds the edit, flash and permission state, and sends the edits and deletions over the socket.

Properties

grouped: boolean

Set when the message continues its author's run. It then has no avatar or author line: its time shows in the avatar's place on hover, and its actions float over its top.

mentionsMe: boolean

Highlights a message that @mentions the user, @everyone included, or replies to them.

Set when the replied-to message was deleted live, after the server filled in replyToAuthor.

canEdit: boolean
canDelete: boolean
flashed: boolean
editing: boolean
onStartEdit: (id: string) => void
onEndEdit: () => void
onEdit: (
id: string,
body: string
) => void

Called only when the text changed.

onDelete: (id: string) => void

Called once the user has confirmed.

onReply: (message: ChatMessage) => void
onJumpTo: (id: string) => void

Usage

import { type ChatMessageItemProps } from "src/components/chat/ChatMessageItem.tsx";