stream-chat-js icon indicating copy to clipboard operation
stream-chat-js copied to clipboard

Query threads by channel ID

Open Phu96 opened this issue 1 year ago • 3 comments

I would like to query threads by the given channel ID, currently it's not supported.

Phu96 avatar May 22 '24 08:05 Phu96

@Phu96 no we don't support it. Whats the usecase for it? Maybe we can provide some alternative solution for it.

vishalnarkhede avatar May 22 '24 09:05 vishalnarkhede

@Phu96 no we don't support it. Whats the usecase for it? Maybe we can provide some alternative solution for it.

@vishalnarkhede Given the channel ID, I think the system should support querying all threads related to that channel

Phu96 avatar May 22 '24 10:05 Phu96

@Phu96 I have implemented it but as a temporary solution, fetch all threads, and use next to make the next thread API call unless there is no next present in the API call, you will end up making multiple API calls to get all the channels thread and then you filter by channelId. vishalnarkhede we should support this. Getting threads by channelId.

shubham-CAW avatar Jun 18 '24 11:06 shubham-CAW

Hi @Phu96, @shubham-CAW,

Thanks for your feature request. While we realize that querying threads for a specific channel may be useful in some cases, it's not something we're considering adding at this time.

The method proposed by @shubham-CAW should work fine, just be sure to set a limit on the number of requests you make - otherwise you may run into rate limits.

myandrienko avatar Aug 26 '24 11:08 myandrienko