Channel entity

Channel is an object that refers to a single chat room.

Properties

The ChannelImpl class implements the Channel protocol and takes the following properties:

extension ChannelImpl: Channel {
public var chat: ChatImpl
public var id: String
public var name: String?
public var custom: [String: JSONCodableScalar]?
public var channelDescription: String?
public var updated: String?
public var status: String?
public var type: ChannelType?

...
}
ParameterDescription
chat
Type: ChatImpl
Reference to the main Chat protocol.
id
Type: String
Unique identifier for the channel. Verify the channel ID with our validator.
name
Type: String
Display name or title of the channel.
custom
Type: [String: JSONCodableScalar]
Any custom properties or metadata associated with the channel in the form of a dictionary of key-value pairs. App Context filtering language doesn’t support filtering by custom properties.
description
Type: String
Brief description or summary of the channel's purpose or content.
updated
Type: String
Timestamp for the last time the channel was updated or modified.
status
Type: String
Current status of the channel, like online, offline, or archived.
type
Type: ChannelType
When a channel is created, one of the available channel types is assigned (depending on the Swift Chat SDK method used for channel creation):
  • direct (1:1)
  • group (multiple people, restricted by invitation)
  • public (open chat for a large audience, anyone can join it)
  • unknown for channels created using the Swift SDK instead of Swift Chat SDK, whose type provided in channel metadata is different than the three default Chat SDK types.
API limits

To learn about the maximum length of parameters used to set channel metadata, refer to REST API docs.

Methods

You can call the following methods on the Channel object.

Click on each method for more details.

Use case

For example, you can use the Channel-related methods to:

Last updated on