ThreadChannel object
ThreadChannel
is an object that refers to a single thread (channel) in a chat.
Properties
The ThreadChannelImpl
class extends ChannelImpl
and implements the ThreadChannel
protocol. It takes the following properties:
extension ThreadChannelImpl: ThreadChannel {
public var chat: ChatImpl
public var id: String
public var name: String?
public var custom: [String: JSONCodableScalar]?
public var description: String?
public var updated: String?
public var status: String?
public var type: ChannelType?
public var parentMessage: MessageImpl
public var parentChannelId: String
...
}
Parameter | Type | Description |
---|---|---|
chat | ChatImpl | Reference to the main Chat protocol. |
id | String | Unique identifier for the channel. Verify the channel ID with our validator. |
name | String | Display name or title of the channel. |
custom | [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 | String | Brief description or summary of the channel's purpose or content. |
updated | String | Timestamp for the last time the channel was updated or modified. |
status | String | Current status of the channel, like online , offline , or archived . |
type | ChannelType | One of the available channel types:
|
parentMessage | MessageImpl | Message for which the thread was created. |
parentChannelId | String | Unique identifier of the main channel on which you create a subchannel (thread channel) and thread messages. |
Methods
You can call the following methods on the ThreadChannel
object.
Click on each method for more details.
getHistory()
pinMessage()
pinMessageToParentChannel()
streamUpdatesOn()
unpinMessage()
unpinMessageFromParentChannel()
- All methods available under the
ChannelImpl
object.
Use case
For example, you can use the ThreadChannel
-related methods to: