truncateChannel method

Future<EmptyResponse> truncateChannel(
  1. String channelId,
  2. String channelType,
  3. {Message? message,
  4. bool? skipPush,
  5. DateTime? truncatedAt}
)

Removes all messages from the channel up to truncatedAt or now if truncatedAt is not provided. If skipPush is true, no push notification will be sent. Message is the system message that will be sent to the channel.

Implementation

Future<EmptyResponse> truncateChannel(
  String channelId,
  String channelType, {
  Message? message,
  bool? skipPush,
  DateTime? truncatedAt,
}) =>
    _chatApi.channel.truncateChannel(
      channelId,
      channelType,
      message: message,
      skipPush: skipPush,
      truncatedAt: truncatedAt,
    );