Unread count for live channels unsupported

We are using latest ts sdk for our app and there we have live channels. Earlier we could get unread count for these live channels with getchannels function but with latest updates, it is showing as unsupported for live channels. There is nothing in the documentation for the same.
Can you please let me know how can we get unread count for our existing live channels? As this new update for not supporting it for live channels broke one important feature in our app.

Hello, may I know what was the previous SDK version that worked well? and are you referring to the latest version as version 6.9.0? Could you please help share the relevant code as well? Thank you :slight_smile:

Hello,
Yes I am referring to version 6.9.0 as the latest version we are using right now. The previous version we were using earlier was 0.0.1-beta-33 . In that version, in getchannels function we were getting unread count by default and now it shows unreadcountsupported as false and unread count as 0 always for live channels.
So can you please help us how do we get this function to work with the latest version.

Thanks!

Hello, with the jump from beta.33 to version 6.9.0, I suggest you check out these links below:

  1. For channel unread count, see Amity SDK Chat Channels Unread Count.
  2. To learn about changes in version 0.0.1-beta.43 (released on 2023-04-11), visit Amity SDK Changelogs and Versioning.

These resources should make the transition smoother for you.

Hi,
I did go through this before posting the question and in the 1st link you have given for channel unread count, it is written in note that unread count is not supported for live channels. So that’s what is my concern. Earlier it was supported in live channels along with other channel types but now it is showing that it supports all other except live channels.
All of our channels are live channels and it is important feature for us. Please let me know what is the workaround for this now?

Are you using other types of channels as well? or only live?

Currently all of our channels are live channels only.

Hello, after double-checking with the team, unfortunately, it appears that there is no available workaround for this. You may need to explore the option of changing the channel types to alternative types.

Docs: Channels - Amity Docs

Okay, may i know what was the reason it is not supported in just one channel type where earlier the same was supported?
Also is there option of changing type of existing channels as we have lot of them and we can’t just create new channels for all of it and what will happen to it’s messages in that case?

The reason for this decision was a performance concern. After assessment, we’ve chosen not to continue supporting unread count for live channels.

To address this issue, we recommend creating new channels with a different type and migrating the existing messages to these new channels. This change should not affect the end users’ experience, and all messages will remain accessible.

Okay thanks for that information.
On migration, may i Know if there is any way I can migrate all the messages from one channel to another channel so that end users don’t see any difference? Can you guide me on the same, that would be really helpful.

Hello, to facilitate message migration, we recommend using our APIs, which are documented here: Amity API Documentation, start by retrieving all existing messages and then create new channels as needed.

For instance:

  1. Create a channel using the following API endpoint: Create Channel
  2. Add channel users via this API endpoint: Add Channel Users
  3. To migrate messages while maintaining their original creation timestamps, use the following API: Add Messages. This API enables you to update the “createdAt” value, ensuring that the messages appear as if they were existing messages to the users.