Manage channel updates
Update channel details and receive events whenever someone updates them.
Requires App Context
To store data about channels, you must enable App Context for your app's keyset in the Admin Portal.
Update channel details
You can edit the metadata of an existing channel with update()
and updateChannel()
.
Both of them give the same output. The only difference is that you call a given method either on the Chat
(updateChannel()
) or the Channel
(update()
) object. Depending on the object, these methods take a different set of input parameters - you either have to specify the channel ID you want to update or not because it's already known.
Method signature
These methods take the following parameters:
-
update()
(on theChannel
object)channel.update(
name: String? = nil,
custom: [String: JSONCodableScalar]? = nil,
description: String? = nil,
status: String? = nil,
type: ChannelType? = nil
) async throws -> ChannelImpl -
updateChannel()
(on theChat
object)chat.updateChannel(
name: String? = nil,
custom: [String: JSONCodableScalar]? = nil,
description: String? = nil,
status: String? = nil,
type: ChannelType? = nil
) async throws -> ChannelImpl