data class ChannelData
A class that only stores the channel data and not all the other channel state Using this prevents code bugs and issues caused by confusing the channel data vs the full channel object
<init> |
create a ChannelData object from a Channel object ChannelData(c: Channel)
A class that only stores the channel data and not all the other channel state Using this prevents code bugs and issues caused by confusing the channel data vs the full channel object ChannelData(type: String, channelId: String) |
channelId |
var channelId: String |
cid |
var cid: String |
createdAt |
when the channel was created var createdAt: Date? |
createdBy |
created by user var createdBy: User |
deletedAt |
when the channel was deleted var deletedAt: Date? |
extraData |
all the custom data provided for this channel var extraData: MutableMap<String, Any> |
frozen |
if the channel is frozen or not (new messages wont be allowed) var frozen: Boolean |
type |
var type: String |
updatedAt |
when the channel was updated var updatedAt: Date? |
toChannel |
convert a channelEntity into a channel object fun toChannel(messages: List<Message>, members: List<Member>, reads: List<ChannelUserRead>, watchers: List<User>, watcherCount: Int): Channel |