stream-chat-js icon indicating copy to clipboard operation
stream-chat-js copied to clipboard

`state` query option in `queryChannels` has no effect

Open jhwheeler opened this issue 7 months ago • 0 comments

Passing in state: false as a query option to the queryChannels function (as specified here: https://getstream.io/chat/docs/javascript/query_channels/#query-options) seems to have no effect on the response. Whether state is true, false, or not set at all, the state property in the channel response is always there.

For example:

const channels = await client.queryChannels({}, {}, { state: false });
console.log(channels);

Channels are returned with state, disregarding the state query option.

This is not a blocker for anything, but it shows an inconsistency in the docs and is potentially a bug in the API. If it's not a bug, then the documentation should be updated.

jhwheeler avatar Mar 28 '25 04:03 jhwheeler