deleteMessage method

Future<void> deleteMessage(
  1. int messageId
)

Deletes a message.

Implementation

Future<void> deleteMessage(int messageId) async {
  sbLog.i(StackTrace.current, 'messageId: $messageId');
  checkUnsupportedAction();

  if (messageId <= 0) {
    throw InvalidParameterException();
  }

  await chat.apiClient.send(ChannelMessageDeleteRequest(
    chat,
    channelType: channelType,
    channelUrl: channelUrl,
    messageId: messageId,
  ));
}