Spelling mistakes and other slip-ups happen just happen sometimes, but it's annoying if you only notice them when you've already sent a message. Now, users can edit messages after they've been sent, from within the TalkJS UI.
Just like with deleting messages, you can configure which roles are allowed to edit messages. You can even allow users to edit all messages in a conversation, which can be useful for moderation. All new roles will allow users to edit their own messages by default. Existing roles have this permission turned off so that nothing changes without you enabling it.
As you can see in the animation above, once a message has been edited, it is labelled with "(edited)" in the chat. If you haven't made any changes to the UserMessage and MessageBody components in the theme you're using, this will work out of the box. If you did make changes there, you can learn how to add the edit indicator in our documentation on message actions.
Message Editing and the REST API
We've added an
editedAt field to messages returned by the API. When a message is first created, this field is
null. When the user edits a message it'll be set to the timestamp of the most recent edit.
When updating a message via the REST API, you can now pass a
markEdited field (defaulting to
false). When set to
true, the message's
editedAt field will be updated to the time of the update, and in our default theme, the message will show up with "(edited)".
Flutter SDK Changes
- Breaking: You can now configure a participant to only receive notifications for mentions. This required us to change the type of the
notifyfield on Participant. It is now of type
ParticipantNotification, an enum with the supported notification settings.
Bugfixes and improvements
We're constantly improving performance and fixing issues under the hood. Here's an overview of just some o the issues we've fixed recently.
- We now show upload progress when the user uploads an attachment.
- Improved the upload preview for videos on mobile. The video now plays back "inline" instead of going full screen.
- Fixed an issue where certain URLs might be parsed incorrectly in messages sent via the REST API, resulting in broken links.