Type Alias: ChatOptions
ChatOptions =
ChatCallbacks&object
Defined in: chat.ts:124
Options accepted by defineChat.
Type Declaration
avatar?
optionalavatar:string
Initial chat picture. A chat may have none.
maxEntries?
optionalmaxEntries:number
Keep at most this many entries, dropping the oldest beyond it.
Remarks
Uncapped by default, so history is never silently lost. Because auto-save
serializes the whole state tree into sessionStorage, a long-running chat
should set a cap; the package warns once a transcript passes
ENTRY_WARN_THRESHOLD without one.
participants?
optionalparticipants: (Contact|string)[]
Initial members, making this a group chat.
Remarks
Membership changes during play, so this is only the starting point.
peer?
optionalpeer:Contact|string
The single other participant, making this a direct chat.
Remarks
Its avatar and name become the chat's fallbacks.
readOnly?
optionalreadOnly:boolean
Whether the player can never reply, as in a channel or an announcement feed.
Remarks
Distinct from simply having no reply available right now - check Chat.canReply for the structural answer and Chat.pendingChoice for the transient one.
title?
optionaltitle:StaticText
Display title. Required in practice for a group; a direct chat falls back to its peer's name.