Skip to main content

Properties

{ text: string; type: "text" } | { markdown: string; type: "markdown" } | { for…
required
"inbound" | "outbound"
required
string
required
TPlatform
required
TSender | undefined
required
TSpace
required
Date
required

Methods

edit()

Parameters

required

Returns

Promise<void>

react()

React to this message. Resolves to the reaction Message (content narrowed to Reaction) — keep it as the handle to unsend() later. Resolves undefined when the platform does not support reactions (warned and skipped). The return type is an inline intersection rather than a TContent generic on Message: a content type parameter would need Content as its default, and Content’s schemas (reaction, reply, edit, group) reference Message — TS rejects the resulting circular default (TS2716).

Parameters

string
required

Returns

MessageAgentSenderMessageUser

read()

Mark this message (and everything before it in the conversation) as read. Sugar for space.send(read(this)). Reads are fire-and-forget; per-platform granularity and support (e.g. iMessage marks the whole chat; Telegram/Slack silently no-op) surface from the provider’s send action. Only inbound messages can be marked read; calling this on an outbound message throws.

Returns

Promise<void>

reply()

Parameters

required

Returns

MessageAgentSender

Parameters

[ContentInput, ContentInput, unknown]
required

Returns

MessageAgentSender

unsend()

Retract this message. Sugar for space.send(unsend(this)). Unsends are fire-and-forget; per-platform support and constraints (e.g. iMessage’s ~2-minute unsend window for regular messages) surface from the provider’s send action. Only outbound messages can be unsent; calling this on an inbound message throws.

Returns

Promise<void>