deleteRemoteMessagesWithIds method
- required String conversationId,
- required ChatConversationType type,
- required List<
String> msgIds,
~english Unidirectionally removes historical message by message ID from the server.
Param conversationId
The conversation ID.
Param type
The conversation type.
Param msgIds
The list of IDs of messages to be removed.
~end
~chinese 根据消息ID 单向删除服务器会话中的消息和本地消息。
Param conversationId
会话 ID。
Param type
会话类型。
Param msgIds
需要删除的消息 ID。
~end
Implementation
Future<void> deleteRemoteMessagesWithIds(
{required String conversationId,
required ChatConversationType type,
required List<String> msgIds}) async {
Map request = {
"convId": conversationId,
"type": type.index,
"msgIds": msgIds,
};
Map result = await ChatChannel.invokeMethod(
ChatMethodKeys.removeMessagesFromServerWithMsgIds,
request,
);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}