addMessagePin static method

Future<NIMResult<void>> addMessagePin(
  1. NIMMessage message, {
  2. String? ext,
})

pin一条消息

Implementation

static Future<NIMResult<void>> addMessagePin(NIMMessage message,
    {String? ext}) {
  final res = NimCore.instance.messageService
      .addMessagePin(message, ext)
      .then((value) {
    if (value.isSuccess) {
      NIMChatCache.instance.addPin(message);
    }
    return value;
  });
  return res;
}