Overview
useFetchManyChatMessagesWrapper is a stateful wrapper around useFetchManyChatMessages that manages the message list and cursor pagination for you. It keeps results in local component state — not Redux — and never receives socket updates.
Use it for a read-only or filtered list of messages that should not be touched by live traffic — for example, a “messages with replies” panel, an admin/moderation view, or any custom message list outside the live conversation stream. For the live canonical conversation view, use useLiveChatMessages instead.
This is a point-in-time query: it does not auto-update from socket events. Call
refetch (e.g. on a refresh button, or on a socket signal of your choosing) to pick up new matches. It does not require ChatProvider.Usage Example
Props
The ID of the conversation to query.
Restrict to thread replies of this message.
Page size. Defaults to
50.Sort by creation time. Defaults to
"desc" (newest first), where loadMore fetches older messages. With "asc", loadMore fetches newer messages.When
true, the server populates the files field on each message.Optional filters.
filters.hasReplies (boolean): when true, returns only messages that have thread replies (threadReplyCount > 0); when false, only messages with none. Filters by thread replies, not quotings.Threads are one level deep, so
hasReplies: true together with parentId always yields an empty list. This wrapper exposes only messages; use the lower-level useFetchManyChatMessages if you want the notice explaining why.Returns
The loaded messages. See ChatMessage.
true while a fetch is in progress.true if more messages can be loaded.Loads the next page in the direction of
sort and appends it. No-ops while loading or when there are no more pages.Re-fetches the first page from scratch (e.g. to pick up new matches).

