Channel handle for adapter-routed posting, state, and metadata access.
Summary
Functions
Fetches channel metadata as Jido.Chat.ChannelInfo.
Builds a channel ref from serialized map data.
Renders adapter-specific mention format for a user id.
Fetches a page of channel-level messages when supported.
Returns a lazy stream over channel messages using cursor pagination.
Returns cached channel name from metadata when present.
Creates a channel reference.
Opens a modal in the channel when supported by the adapter.
Opens a native platform thread from an existing channel message when supported.
Posts string/postable/stream content to channel via adapter.
Posts an ephemeral message via adapter when supported.
Returns the Zoi schema for ChannelRef.
Uploads a file to the channel when supported by the adapter.
Sets channel state in chat struct using :replace, :merge, or key/value modes.
Starts typing indicator on channel when supported.
Gets channel state map or a single key from chat struct state.
Lists thread summaries in this channel when supported.
Returns a lazy stream over channel thread summaries using cursor pagination.
Serializes channel ref into a plain map with type marker.
Types
Functions
@spec fetch_metadata( t(), keyword() ) :: {:ok, Jido.Chat.ChannelInfo.t()} | {:error, term()}
Fetches channel metadata as Jido.Chat.ChannelInfo.
Builds a channel ref from serialized map data.
Renders adapter-specific mention format for a user id.
@spec messages(t(), keyword() | map() | Jido.Chat.FetchOptions.t()) :: {:ok, Jido.Chat.MessagePage.t()} | {:error, term()}
Fetches a page of channel-level messages when supported.
@spec messages_stream(t(), keyword() | map() | Jido.Chat.FetchOptions.t()) :: Enumerable.t()
Returns a lazy stream over channel messages using cursor pagination.
Returns cached channel name from metadata when present.
Creates a channel reference.
@spec open_modal(t(), Jido.Chat.Modal.t() | map(), keyword()) :: {:ok, Jido.Chat.ModalResult.t()} | {:error, term()}
Opens a modal in the channel when supported by the adapter.
@spec open_thread(t(), String.t() | integer(), keyword()) :: {:ok, Jido.Chat.Thread.t()} | {:error, term()}
Opens a native platform thread from an existing channel message when supported.
@spec post( t(), String.t() | Jido.Chat.Postable.t() | map() | Enumerable.t(), keyword() ) :: {:ok, Jido.Chat.SentMessage.t()} | {:error, term()}
Posts string/postable/stream content to channel via adapter.
@spec post_ephemeral( t(), String.t() | integer(), String.t() | Jido.Chat.Postable.t() | map(), keyword() ) :: {:ok, Jido.Chat.EphemeralMessage.t()} | {:error, term()}
Posts an ephemeral message via adapter when supported.
Returns the Zoi schema for ChannelRef.
@spec send_file(t(), Jido.Chat.FileUpload.input(), keyword()) :: {:ok, Jido.Chat.SentMessage.t()} | {:error, term()}
Uploads a file to the channel when supported by the adapter.
@spec set_state(Jido.Chat.t(), t(), atom() | term(), map() | term()) :: Jido.Chat.t()
Sets channel state in chat struct using :replace, :merge, or key/value modes.
Starts typing indicator on channel when supported.
@spec state(Jido.Chat.t(), t(), term() | nil) :: map() | term()
Gets channel state map or a single key from chat struct state.
@spec threads( t(), keyword() ) :: {:ok, Jido.Chat.ThreadPage.t()} | {:error, term()}
Lists thread summaries in this channel when supported.
@spec threads_stream( t(), keyword() ) :: Enumerable.t()
Returns a lazy stream over channel thread summaries using cursor pagination.
Serializes channel ref into a plain map with type marker.