deleteRemoteMessagesWithIds method
- {required String conversationId,
- required ChatConversationType type,
- required List<
String> msgIds}
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.
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;
}
}