Edit and Delete Messages
Last updated
Last updated
AmityMessageRepository
class provides APIs for you to perform actions on messages you've sent or received. These actions include editing and deleting an existing message, as well as marking a message as being read by you. You can only perform edit and delete operations on messages you've sent.
You can only perform edit and delete operations on your own messages. When editing a message, the message's editedAtDate
will be set to the current time. This allows you to provide UI to the user to inform the user of specific messages that have been edited, if needed. An optional completion block can be provided to notify you of operation success.
The delete message functionality allows users to remove a message from a chat or messaging application. This feature provides flexibility and control, allowing users to delete messages they no longer wish to be visible to other participants in the conversation.
By utilizing the delete message function, users can remove a specific message from the chat history. This can be useful in various scenarios, such as correcting mistakes, removing sensitive or inappropriate content, or simply managing the flow of the conversation. Once the message is deleted, it may still be shown as a deleted message with timestamp which depends on the Query and Filter Messages condition.
The delete message function typically requires the messageId
as a parameter, which uniquely identifies the message to be deleted. Once the message is deleted, it will no longer be visible to other users in the chat or messaging context.