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
watcher pagination options. This works but runs into a rate limit
- I have tried using the
queryChannelsRequest endpoint and tried forcibly injecting the watcher_limit and watcher within the ChannelOptions while ignoring the type errors.
- I have tried setting
presence to true and also tried setting watch to false on the queryChannelsRequest input
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
ChannelOptions type 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;
};
High Level Description
The
apiClient.queryChannelsRequestmethod does not providewatchers. The lack ofwatcherdata 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
watcherpagination options. This works but runs into a rate limitqueryChannelsRequestendpoint and tried forcibly injecting thewatcher_limitandwatcherwithin the ChannelOptions while ignoring the type errors.presenceto true and also tried settingwatchto false on thequeryChannelsRequestinputSuggested Fix
The suggested fix has multiple parts:
ChannelOptionstype in the SDK client and port the appropriate data through (my personal use-case is in node):