createEmptyMessage static method

Future<NIMResult<NIMMessage>> createEmptyMessage(
  1. {required String sessionId,
  2. required NIMSessionType sessionType,
  3. required int timestamp}
)

创建空消息

创建一条空消息,仅设置了聊天对象以及时间点,用于记录查询

  • sessionId 聊天对象ID
  • sessionType 会话类型
  • timestamp 查询的时间起点信息

Implementation

static Future<NIMResult<NIMMessage>> createEmptyMessage(
    {required String sessionId,
    required NIMSessionType sessionType,
    required int timestamp}) async {
  return NIMResult.success(
      data: NIMMessage.emptyMessage(
          sessionId: sessionId,
          sessionType: sessionType,
          timestamp: timestamp));
}