From e584fe8c9a7fbd222567ca227bdaf9113a1774fe Mon Sep 17 00:00:00 2001 From: Vishal Narkhede Date: Sun, 28 Jan 2024 23:58:52 +0100 Subject: [PATCH] refactor: moved watch to backend --- src/client.ts | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/src/client.ts b/src/client.ts index bdc01404d..fe3c48e83 100644 --- a/src/client.ts +++ b/src/client.ts @@ -2591,12 +2591,12 @@ export class StreamChat>(this.baseURL + `/threads`, opts); @@ -2607,22 +2607,6 @@ export class StreamChat thread.channel.cid); - if (options?.watch && cids.length > 0) { - await this.queryChannels( - { - cid: { $in: cids }, - } as ChannelFilters, - {}, - { - limit: 30, - message_limit: 0, - watch: true, - }, - ); - } - return { threads, next: res.next, @@ -2636,18 +2620,15 @@ export class StreamChat>(this.baseURL + `/threads/${messageId}`, opts); - if (options?.watch) { - const channel = this.channel(res.thread.channel.type, res.thread.channel.id); - await channel.watch(); - } - return new Thread(this, res.thread); } + async partialUpdateThread(messageId: string, partialThreadObject: PartialThreadUpdate) { if (!messageId) { throw Error('Please specify the message id when calling updateThread');