updateMessage method
- ChatMessage 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 ChatError. ~end
~chinese 更新本地消息。
会同时更新本地内存和数据库。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end
Implementation
Future<void> updateMessage(ChatMessage message) async {
  Map req = {"message": message.toJson()};
  Map result =
      await ChatChannel.invokeMethod(ChatMethodKeys.updateChatMessage, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}