ChannelData

constructor(id: String, type: String, name: String = "", image: String = "", createdBy: User = User(), cooldown: Int = 0, frozen: Boolean = false, createdAt: Date? = null, updatedAt: Date? = null, deletedAt: Date? = null, memberCount: Int = 0, team: String = "", extraData: Map<String, Any> = mapOf(), ownCapabilities: Set<String> = setOf(), membership: Member? = null)

Parameters

id

Channel's unique ID.

type

Type of the channel.

name

Channel's name.

image

Channel's image.

createdBy

Creator of the channel.

cooldown

Cooldown period after sending each message in seconds.

frozen

Whether channel is frozen or not.

createdAt

Date/time of creation.

updatedAt

Date/time of the last update.

deletedAt

Date/time of deletion.

memberCount

Number of members in the channel.

team

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

extraData

A map of custom fields for 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 the channel.


constructor(channel: Channel, currentOwnCapabilities: Set<String>)

Deprecated

Use Channel.toChannelData instead

Replace with

Channel.toChannelData()

Creates a ChannelData entity from a Channel object. Keeps existing ChannelData.ownCapabilities if the Channel object comes with an empty set of capabilities.

Parameters

channel

The Channel object to convert.

currentOwnCapabilities

Set of existing own capabilities stored for the Channel.