truncateChannel

fun truncateChannel(channelType: String, channelId: String, systemMessage: Message? = null, hardDelete: Boolean = false, skipPush: Boolean = false): Call<Channel>

Removes all of the messages of the channel but doesn't affect the channel data or members.

Return

Executable async Call which completes with Result having data equal to the truncated channel if the channel was successfully truncated.

Parameters

channelType

The channel type. ie messaging.

channelId

The channel id. ie 123.

systemMessage

The system message that will be shown in the channel.

hardDelete

If true, the messages are deleted instead of hidden. Requires the permission to delete the channel.

skipPush

If true, no push notification is sent for the system message.