updateMessage abstract method
Replaces an oldMessage with a newMessage.
When implementing, the oldMessage parameter might refer to an outdated
instance of the message if it has been updated elsewhere (e.g., an image
message getting its dimensions). To ensure correctness:
- Identify the message in your data store using
oldMessage.id. - Retrieve the current version of that message from your store (this is the true 'before' state).
- The emitted
ChatOperation.update(currentOldMessageFromStore, newMessage)must use thiscurrentOldMessageFromStoreand thenewMessage.
Implementation
Future<void> updateMessage(Message oldMessage, Message newMessage);