library / io.getstream.chat.android.livedata / ChannelData

ChannelData

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

Constructors

<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)

Properties

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?

Functions

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