Update a message
Update the content of a sent message in a community channel by calling community.modifyMessage(). Only successfully sent messages can be updated.
Dart
final community = CommunityChannel('<community-id>');
// Modify the original message's text, then pass it as the new content.
final textMessage = message as TextMessage;
textMessage.text = 'Updated text';
await community.modifyMessage(
ModifyMessageParams(
messageId: message.messageId,
newMessage: textMessage,
),
(error) {
if (error == null) {
print('Message updated');
}
},
);
Listen for message updates
info
The MessageHandler callback for community channel message modifications is not yet exposed in the Flutter wrapper. This section will be updated when the API is available.