-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
High Level Description
The apiClient.queryChannelsRequest method does not provide watchers. The lack of watcher data limits the usability of the bulk query channels endpoint and requires a backend change. Without this data, we are forced to query the channels one at a time.
What I've Tried
- I have attempted to use the queryChannel by ID functionality which provides the appropriate data with the
watcherpagination options. This works but runs into a rate limit - I have tried using the
queryChannelsRequestendpoint and tried forcibly injecting thewatcher_limitandwatcherwithin the ChannelOptions while ignoring the type errors. - I have tried setting
presenceto true and also tried settingwatchto false on thequeryChannelsRequestinput
Suggested Fix
The suggested fix has multiple parts:
- Add an input option for watcher_limit on the bulk channels endpoint
- Introduce a watcher_limit on the
ChannelOptionstype in the SDK client and port the appropriate data through (my personal use-case is in node):
export type ChannelOptions = {
limit?: number;
member_limit?: number;
message_limit?: number;
offset?: number;
presence?: boolean;
state?: boolean;
user_id?: string;
watch?: boolean;
watcher_limit?: number;
};Metadata
Metadata
Assignees
Labels
No labels