updateMessage method
- ChatMessage message
Updates a message in the local database.
The latestMessage of the conversation and other properties will be updated accordingly. The message ID of the message, however, remains the same.
Param message
The message to be updated.
Throws A description of the exception. See ChatError.
Implementation
Future<void> updateMessage(ChatMessage message) async {
Map req = this._toJson();
req['msg'] = message.toJson();
Map result = await _emConversationChannel.invokeMethod(
ChatMethodKeys.updateConversationMessage, req);
ChatError.hasErrorFromResult(result);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}