unpinMessage method

Future<void> unpinMessage({
  1. required String messageId,
})

~english Unpins a message. Param messageId The message ID.

Throws A description of the exception. See ChatError. ~end ~chinese 取消置顶消息。 Param messageId 消息 ID。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end

Implementation

Future<void> unpinMessage({required String messageId}) async {
  Map map = {'msgId': messageId};

  Map result = await ChatChannel.invokeMethod(
    ChatMethodKeys.unpinMessage,
    map,
  );
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}