Skip to main content

Interface: ChatInput

Chat payload accepted by url() / urlByChatId() / sendMessage(). Looser than the strict REST ChatCreate body — used in TWO distinct wire flows that each validate a different subset:

  1. URL-signing (url() / urlByChatId()) — validated by the backend's ChatIndexRequest controller (emby/app/Http/Requests/ChatIndexRequest.php). Recognizes: id, title, socket_port (≤4 chars), create (boolean), metadata. type is ignored here — the URL-signing validator does not declare a rule for chat.type.

  2. REST (sendMessage → chat.sendMessage) — validated by SendMessageRequest. Recognizes type, title, metadata (no create / socket_port — those are URL-signing-only).

normalizeChat() (libs/signing.ts) uses the UNION whitelist (id/title/socket_port/create/type/metadata); anything else is dropped before the wire. Each backend validator then ignores fields it doesn't know.

Properties​

create?​

optional create?: boolean


id?​

optional id?: string


metadata?​

optional metadata?: StringMap


socket_port?​

optional socket_port?: string | number


title?​

optional title?: string


type?​

optional type?: ChatType