updateReads

fun Channel.updateReads(newRead: ChannelUserRead, currentUserId: UserId): Channel

Updates the Channel with a new ChannelUserRead. If an existing read for the user already exists, it will be replaced with the new one. If not, the new read will be added to the list of reads.

Parameters

newRead

New read to update the channel with.

currentUserId

User id of the currently logged in user.