createEmptyMessage method Null safety
- {required String sessionId,
- required NIMSessionType sessionType,
- required int timestamp}
Create an empty message.
The empty message is used for recording. It only contains the chat partner and time information.
sessionId
If the conversation type is one-to-one chat, it is the chat partner's accid; if group chat, group ID.sessionType
The conversation type, including one-to-one chat and group chattimestamp
The start time for query
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));
}