stream-chat-js
stream-chat-js copied to clipboard
`state` query option in `queryChannels` has no effect
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.