updateMessage method
- EMMessage message
~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 {
try {
Map req = {"message": message.toJson()};
Map result = await Client.instance.chatManager
.callNativeMethod(ChatMethodKeys.updateChatMessage, req);
EMError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}