Skip to main content
Per-channel history sub-API. Provides access to channel-level messages and thread listings.

Methods

listMessages()

Fetch top-level messages in a channel (not thread replies). Delegates to adapter.fetchChannelMessages when available. Adapters that persist history in the SDK-side store (persistThreadHistory) are served from the channel-keyed cache instead.

Parameters

string
required

Returns

FetchResult

listThreads()

List threads in a channel. Delegates to adapter.listThreads.

Parameters

string
required

Returns

ListThreadsResult

listThreadsWithMessages()

Convenience: list threads and fetch messages for each in parallel. Fetches up to maxThreads (default 5) threads, then messagesPerThread messages per thread.

Parameters

string
required
{ cursor: string; maxThreads: number; messagesPerThread: number }

Returns

Message