Channel

constructor(id: String = "", type: String = "", name: String = "", image: String = "", watcherCount: Int = 0, frozen: Boolean = false, lastMessageAt: Date? = null, createdAt: Date? = null, deletedAt: Date? = null, updatedAt: Date? = null, syncStatus: SyncStatus = SyncStatus.COMPLETED, memberCount: Int = 0, messages: List<Message> = listOf(), members: List<Member> = listOf(), watchers: List<User> = listOf(), read: List<ChannelUserRead> = listOf(), config: Config = Config(), createdBy: User = User(), unreadCount: Int = 0, team: String = "", hidden: Boolean? = null, hiddenMessagesBefore: Date? = null, cooldown: Int = 0, pinnedMessages: List<Message> = listOf(), ownCapabilities: Set<String> = setOf(), membership: Member? = null, cachedLatestMessages: List<Message> = emptyList(), isInsideSearch: Boolean = false, extraData: Map<String, Any> = mapOf())

Parameters

id

Channel's unique ID.

type

Type of the channel.

name

Channel's name.

image

Channel's image.

watcherCount

Number of channel watchers.

frozen

Whether channel is frozen or not.

lastMessageAt

Date of the last message sent.

createdAt

Date/time of creation.

deletedAt

Date/time of deletion.

updatedAt

Date/time of the last update.

syncStatus

Local field used to store channel's sync status and retry requests if needed.

memberCount

Number of members in the channel.

messages

The list of channel's messages.

members

The list of channel's members.

watchers

The list of channel's watchers.

read

The list of read states.

config

Channel's configuration.

createdBy

Creator of the channel.

unreadCount

The number of unread messages for the current user.

team

Team the channel belongs to (multi-tenant only).

hidden

Whether this channel is hidden by current user or not.

hiddenMessagesBefore

Messages before this date are hidden from the user.

cooldown

Cooldown period after sending each message in seconds.

pinnedMessages

The list of pinned messages in the channel.

ownCapabilities

Channel's capabilities available for the current user. Note that the field is not provided in the events.

membership

Represents relationship of the current user to this channel.

extraData

A map of custom fields for the channel.

cachedLatestMessages

The list of cached messages if the regular list does not contain the newest messages.

isInsideSearch

When the channel is inside search, eg. searching from the channel list for a message or when hopping to a quoted message a number pages away without retaining the newest messages in the list.