Delete messages
The delete messages feature allows users to remove individual messages or all messages in a conversation, depending on their permissions. Messages are removed from the UI and aren’t permanently deleted from the system. Instead, they’re marked as DELETED in the database for data retention purposes.
Individual messages can be removed using the delete action that appears when you hover over a message.
To remove all messages in a conversation, click the Delete all messages button located in the control bar. This action also removes system messages.
Configuration
To enable the message deletion feature, set com.unblu.messenger.messageDeletionEnabled to true.
Delete permissions
These conversation-level properties let you configure which participant types can delete messages, either their own or others', and whether the deletion applies only to their view or to all participants.
Confirmation dialog
When a user clicks the delete action on an individual message or the Delete all messages action in the control bar, a modal dialog appears to confirm the deletion. The options presented in this dialog depend on the user’s permissions:
-
Delete for everyone
-
Delete for me
-
Cancel
The Delete for everyone button appears only if the user has permissions to delete both their own and others' messages for everyone. Similarly, the Delete for me button appears only if the user has permissions to delete both their own and others' messages for themselves only. The Cancel button is always present.
What the deleted messages look like
What users see in place of a deleted message depends on their permissions. The system determines what to show based on the following order of precedence:
-
A collapsible section containing the deleted message’s content
This option always includes the placeholder text (for example, "This message was deleted") followed by a chevron
that can be clicked to reveal the content.
It’s shown when the user’s participation type is included in at least one of the following properties:
-
A placeholder only—for example, "This message was deleted"
This is shown when the user’s participation type isn’t allowed to see the deleted content but is included in at least one of the following properties:
-
A blank space, with no indication that a message existed
This is shown when the user’s participation type isn’t included in any of the content or placeholder properties mentioned above.
Delete all messages
The Delete all messages action removes every message in a conversation. It is the only action that also deletes system messages. When a system message is deleted, there is no visible indication that it ever existed.
Specify the participant types who can perform this action with com.unblu.conversation.message.allowDeleteAllMessages. Participants included in this property must also be allowed to delete at least their own and others' messages for themselves or for everyone.
Once these requirements are met, the Delete all messages button appears in the control bar. Clicking this button opens the Confirmation dialog.
Delete files
The configuration property previously used to allow file deletion (com.unblu.conversation.file.allowFileDeletion) was deprecated in Unblu 8.23.2 and can no longer be used.
File deletion now follows the same rules as message deletion. This includes both the permissions that control who can delete messages and the placeholder behavior applied when messages are deleted. If the message deletion feature is disabled, or if a user lacks the necessary permissions, they can’t delete files in any conversation.
Text properties
You can configure the text displayed in various parts of the delete messages feature using the following text properties, listed in the order of the message deletion interaction flow.
Button tooltip
The text "Delete" displayed in the tooltip of the delete message button
com.unblu.conversation.messaging.ui.messageDeleteHint
Delete button labels
The text "Delete all messages" displayed on the Delete all messages button on the agent’s side in the control bar
com.unblu.agent.conversation.ui.btnDeleteAllMessages
The text "Delete all messages" displayed on the Delete all messages button on the visitor’s side in the action bar
com.unblu.conversation.actionbar.ui.actionBarDeleteAllMessages
Confirmation dialog titles
The text "Delete messages?" displayed as the title of the confirmation dialog when deleting a single message
com.unblu.conversation.messaging.ui.messageDeleteDialogTitle
The text "Delete all messages?" displayed as the title of the confirmation dialog when deleting all messages
com.unblu.conversation.messaging.ui.messageDeleteAllDialogTitle
Confirmation dialog description
The text "The delete action cannot be undone" displayed as the description of the confirmation dialog
com.unblu.conversation.messaging.ui.messageDeleteDialogDescription
Confirmation dialog buttons
The text "Delete for everyone" displayed on the Delete for everyone button in the confirmation dialog
com.unblu.conversation.messaging.ui.messageDeleteForEveryone
The text "Delete for me" displayed on the Delete for me button in the confirmation dialog
com.unblu.conversation.messaging.ui.messageDeleteForMe
Deleted message placeholder
The text "This message was deleted" displayed in the placeholder that replaces the deleted message
com.unblu.conversation.messaging.ui.labelMessageDeleted
Limitations
When a message is deleted, you can’t see who it was deleted for. For example, if you delete your own message for yourself, there’s no indication that other participants can still see it.
The delete messages feature isn’t intended to be used with external messengers. Messages deleted in Unblu aren’t removed from the UI of external messengers.
See also
-
For more information about deleting messages, refer to the Deleting messages section of the Agent Desk guide.