updateMessage method
~english Updates the local message.
The message will be updated both in the cache and local database.
Throws A description of the exception. See EMError. ~end
~chinese 更新本地消息。
会同时更新本地内存和数据库。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError。 ~end
Implementation
Future<void> updateMessage(EMMessage message) async {
Map req = {"message": message.toJson()};
Map result =
await ChatChannel.invokeMethod(ChatMethodKeys.updateChatMessage, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}