pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/chatwoot/chatwoot/pull/13685

ssets/global-94620c216484da1f.css" /> feat: Show error when deleting messages on unsupported channels by joao-baza · Pull Request #13685 · chatwoot/chatwoot · GitHub
Skip to content

feat: Show error when deleting messages on unsupported channels#13685

Open
joao-baza wants to merge 4 commits intochatwoot:developfrom
joao-baza:feature/13684-disable-delete-unsupported-channels
Open

feat: Show error when deleting messages on unsupported channels#13685
joao-baza wants to merge 4 commits intochatwoot:developfrom
joao-baza:feature/13684-disable-delete-unsupported-channels

Conversation

@joao-baza
Copy link
Contributor

@joao-baza joao-baza commented Feb 28, 2026

Description

Currently, the "Delete message" button in Chatwoot performs a soft-delete — it only removes the message from the Chatwoot interface but does not delete it on the external platform (e.g., WhatsApp, Telegram, Facebook). This causes confusion for agents who lose visibility of the conversation, while the customer retains the full chat history on their end.

This change shows an explicit error message ("This inbox does not support message deletion") when an agent tries to delete a message on a channel that doesn't support real deletion via its external API. Only Chatwoot-native channels (Web Widget and API) allow message deletion, since the soft-delete effectively removes the message for the end user.

Gostaria de especificar isso em outro momento, mas só para constar: é necessário adicionar a opção de exclusão real do Telegram, que suporta a exclusão de mensagens lado a lado. Talvez eu implemente isso após este PR ser aprovado.

Fixes #13684

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Opened a Web Widget conversation → right-clicked a message → Delete option opens the confirmation modal as expected ✅
  • Opened a WhatsApp/Telegram/Email/... conversation → right-clicked a message → Delete option shows error alert: "This inbox does not support message deletion" ✅

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Channels that don't support real message deletion via their external APIs
(e.g., WhatsApp, Telegram, Facebook) now show an explicit error message
instead of silently soft-deleting. Only Chatwoot-native channels
(Web Widget and API) allow message deletion.

Fixes chatwoot#13684
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a916b041b0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +370 to +373
const canDeleteOnChannel = computed(() => {
const channelType = inbox.value?.channel_type;
return CHANNELS_WITH_DELETE_SUPPORT.includes(channelType);
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow private notes to bypass channel delete restriction

This gate is computed only from inbox.channel_type, so in non-WebWidget/API inboxes it blocks deletion for every message type, including internal private notes. Private notes (private: true) are Chatwoot-only content and do not depend on external channel delete APIs, so agents can no longer delete their own notes in WhatsApp/Telegram/Facebook conversations even though backend messages#destroy still supports it.

Useful? React with 👍 / 👎.

@sojan-official sojan-official added the community PRs from the community label Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy