Delete channels
Permanently remove a channel from App Context storage with Delete() or DeleteChannel().
Both methods produce the same result. Call Delete() on a Channel object or DeleteChannel() on the Chat object with the channel ID.
Soft delete deprecated
Soft deletion for channels has been deprecated. Delete() now always performs a hard delete. Use Delete() without any parameters to permanently remove a channel. The soft parameter and Restore() method are no longer available for channels.
Requires App Context
Enable App Context for your keyset in the Admin Portal.
Method signature
These methods take the following parameters:
-
Delete()(on theChannelobject)1channel.Delete() -
DeleteChannel()(on theChatobject)1chat.DeleteChannel(string channelId)
Input
| Parameter | Required in Delete() | Required in DeleteChannel() | Description |
|---|---|---|---|
channelIdType: stringDefault: n/a | No | Yes | Unique channel identifier. |
Output
| Type | Description |
|---|---|
Task<ChatOperationResult> | Returned Task that you can await to get the result of the delete operation. |
Sample code
Permanently delete the channel with the ID of support.
-
Delete()(on theChannelobject)1 -
DeleteChannel()(on theChatobject)1