deleteMessage method

Future<void> deleteMessage(
  1. int messageId
)

Deletes message with given messageId.

After this method completes successfully, channel event ChannelEventHandler.onMessageDeleted will be invoked.

Implementation

Future<void> deleteMessage(int messageId) async {
  if (messageId <= 0) {
    throw InvalidParameterError();
  }

  await _sdk.api.send(ChannelMessageDeleteRequest(
    channelType: channelType,
    channelUrl: channelUrl,
    messageId: messageId,
  ));
}