Read Status & Unread Count (Legacy)
For Android, iOS, JS SDK version 6.5.0 and below and TS SDK version v0.0.1-beta.42.3
Reading Status and Unread Count
Last updated
Was this helpful?
Was this helpful?
const liveObject = ChannelRepository.getChannel('channelId');
liveObject.on('dataUpdated', channel => {
// the number of unread messages
console.log(channel.unreadCount);
});// start reading a channel
await ChannelRepository.startReading({ channelId: 'channel1' });
// stop reading a channel
await ChannelRepository.stopReading({ channelId: 'channel1' });