toChannel

fun toChannel(messages: List<Message>, cachedLatestMessages: List<Message>, members: List<Member>, reads: List<ChannelUserRead>, watchers: List<User>, watcherCount: Int, insideSearch: Boolean): Channel

Converts a ChannelData entity to a Channel based on additional information.

Return

A Channel object.

Parameters

messages

The list of channel's messages.

members

The list of channel's members.

reads

The list of read states.

watchers

The list of channel's watchers.

watcherCount

Number of channel watchers.