interface ChatSendMessage

Sent by WSProvider when the user posts in the chatbox, which shows the message as pending meanwhile. The server broadcasts it as ChatMessageMessage, or answers a chat ErrorMessage.

Properties

type: "chat_send"
body: string
optional
replyToId: string

Ignored if longer than 64 characters or naming no message.

optional
nonce: string

Chosen by the client, and echoed on the broadcast or the error, so that it can match the outcome to its pending message. Ignored if longer than 64 characters.

Usage

import { type ChatSendMessage } from "shared/ws.ts";