Get channel details
Fetch details of a specific channel using the getChannel()
method.
Requires App Context
To store data about channels, you must enable App Context for your app's keyset in the Admin Portal.
Method signature
This method takes the following parameters:
chat.getChannel(channelId: String): PNFuture<Channel?>
Input
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channelId | String | Yes | n/a | Unique channel identifier (up to 92 UTF-8 byte sequences). |
Output
Type | Description |
---|---|
PNFuture<Channel> | PNFuture containing the channel object with its metadata. |
Basic usage
Fetch the support
channel metadata.
chat.getChannel("support").async { result ->
result.onSuccess {
// handle success
}.onFailure {
// handle failure
}
}