What's the best to get the unread msgs for +300 channels?

Hello,

Our chat use case require us to keep the user tracked with +300 channels and maybe even more in the future. So for that, We’ve implemented the unread count using the Channel Participation docs page.

But the problem is the user’s client-side has to make +300 api calls at the same time, Since everytime I run
const liveObject = ChannelRepository.getChannel('channelId'); there’s an api to make!
Peek 2022-12-24 23-38
Which just does not feel right does it? Sometimes I even get the ASCError: ASCWebSDK: RateLimit Exceed error!!

Is there any elegant solution for this? Like a webhook or something.
I appreciate any help. Thanks!

Hello, could you please share with us the UI as well, which component are you referring to, so we can check if there are other potential methods? :))

Hey,

I am using my own Custom UI
Peek 2022-12-30 13-33

with the Web js SDK! basically I need to get the unread msgs for ~300 channels for this UI to work, otherwise it is not a good UX and its not even usable.

Thanks.

Hey @Moe is it possible for you to implement pagination? this should all work out and this won’t exceed the rate limit.

Hey @amitysupport Unfortunately, pagination is also not possible. I wish I could do that.

I really appreciate the help if you have other solutions; This issue currently is the decider whether we go with Amity or not! It’s really annoying, the SDK works nicely for us for everything else.

Hey @Moe unfortunately, at this moment, that is the only solution we can provide, it is the limitation on our web platform :))

Thanks alot. I absolutely loved the Chat SDK. If this feature somehow become available in this SDK would you please ping me here; I’d definitely come back to it.

Thanks again!

Hey again, QQ if pagination is an option how can I solve that with pagination?

Hi @Moe you can apply pagination to your custom UIKit, https://europe1.discourse-cdn.com/standard21/uploads/amity/original/1X/1352d4f15fabfc83805928a9d746cc014f2c48f5.gif

once applied, instead of the 300+ list appearing right away the list will load as your users continue to scroll down the list.

Did that help answer your question?