@SocialPlus_Support I’m using ts-sdk for the chat. I want to know how many unread messages are there in the channel. In the channel response, I’m always getting 0 as the unread message but I have 20+ messages in that channel.
@SocialPlus_Support I’m using 0.0.1-beta.38
@SocialPlus_Support I updated the pack into latest version 0.0.1-beta.39 but still facing the same issue. I’ve attached the channel response below
Hey @sarathdixit,
This feature is currently being worked on and is at least few weeks from completion. Currently the SDK sets it to 0 by default.
Although in the interim if you wish to calculate it on your end, you can do so using the following logic
channel's unreadCount = Max(0, channel.messageCount - Max(localReadToSegment, channelUser.ReadToSegment) )
channel's hasUnreadMention = Max(localReadToSegment, channelUser.ReadToSegment)
< Max(localLastMentionedSegment, channelUser.lastMentionedSegment)
@cijin In which query I’ll get the data of channelUser.ReadToSegment
and channelUser.lastMentionedSegment
?
Might have been a mistake on my end. Please check, this post for details.
Hi @sarathdixit
We’ve confirmed this issue in our current release, which should be fixed by the end of this month.
We’ll inform you once it’s released.
Any other issues please don’t hesitate to let us know.
Thank you,
Amity Support
@SocialPlus_Support any update on this?
Hi @sarathdixit
As mentioned, this will be released by the end of this month.
Our team is currently working as fast as we can and we’ll inform you immediately once it’s fixed.
Thank you,
Amity Support