saveTipsMessage static method

void saveTipsMessage(
  1. String sessionId,
  2. NIMSessionType sessionType,
  3. String content
)

本地保存tip 消息 不计入未读数

Implementation

static void saveTipsMessage(
    String sessionId, NIMSessionType sessionType, String content) {
  MessageBuilder.createTipMessage(
          sessionId: sessionId, sessionType: sessionType, content: content)
      .then((value) {
    if (value.isSuccess && value.data != null) {
      value.data!.config =
          NIMCustomMessageConfig(enablePush: false, enableUnreadCount: false);
      NimCore.instance.messageService.saveMessageToLocalEx(
          message: value.data!, time: value.data!.timestamp);
    }
  });
}