pinMessage method

Future<void> pinMessage(
  1. int messageId
)

Pins a message to the channel. messageId is id of a message to pin.

Implementation

Future<void> pinMessage(int messageId) async {
  if (messageId <= 0) throw InvalidParameterException();

  sbLog.i(StackTrace.current, 'messageId: $messageId');

  await chat.apiClient.send(
    PinCreateRequest(
      chat,
      channelType: ChannelType.group,
      channelUrl: channelUrl,
      messageId: messageId,
    ),
  );
}