deleteMessage method
- String messageId
Deletes a message in the local database.
Note After this method is called, the message is only deleted both from the memory and the local database.
Param messageId
The ID of message to be deleted.
Throws A description of the exception. See ChatError.
Implementation
Future<void> deleteMessage(String messageId) async {
Map req = this._toJson();
req['msg_id'] = messageId;
Map result = await _emConversationChannel.invokeMethod(
ChatMethodKeys.removeMessage, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}