Skip to content

Commit

Permalink
fix: watch handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnarkhede committed Jan 26, 2024
1 parent 7419655 commit 62753be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2590,12 +2590,13 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
reply_limit?: number;
watch?: boolean;
}) {
// eslint-disable-next-line
const { watch, ...optionsWithoutWatch } = options || {};
const opts = {
limit: 10,
participant_limit: 10,
reply_limit: 3,
watch: true,
...(options || {}),
...optionsWithoutWatch,
};

const res = await this.post<QueryThreadsAPIResponse<StreamChatGenerics>>(this.baseURL + `/threads`, opts);
Expand Down

0 comments on commit 62753be

Please sign in to comment.