Skip to content

Feature Request: Watchers in Bulk Query Channels #1612

@DsMaccy

Description

@DsMaccy

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

  1. 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
  2. I have tried using the queryChannelsRequest endpoint and tried forcibly injecting the watcher_limit and watcher within the ChannelOptions while ignoring the type errors.
  3. 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:

  1. Add an input option for watcher_limit on the bulk channels endpoint
  2. 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;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions