Skip to content

Deleting a thread's replies does not delete the thread #42633

Open

Description

@kfindeisen

Description:

When the sole message in a thread is deleted, the channel/DM continues to show a thread with 0 replies instead of deleting the thread.

This issue is similar to #21560, but that one involves deleting the message posted directly to the channel, not a reply.

Steps to reproduce:

  1. Write a message (A).
  2. Reply to message A to start a thread, with "Also send to channel" turned off (B).
  3. Delete message B.

Expected behavior:

Message A is displayed by itself (no thread), as if message B had not been written.

Actual behavior:

Message A has a "View thread" button and a count of 0 replies. If messages A and B were written by different people (not shown in screenshot), both appear as participants.

Message A with empty thread in main window

Clicking "View thread" opens a panel containing only message A, equivalent to clicking "Reply in thread" on a fresh message.

All behaviour persists on reloading the channel/DM.

Server Setup Information:

  • Version of Rocket.Chat Server: 8.6

Client Setup Information

  • Desktop App Version: 4.17.4
  • Operating System: MacOS 27.0.1

Relevant logs:

Desktop app's log viewer shows no logs (down to Info level) from the relevant time.

Activity

  1. schizophrenicmaniac commented on Oct 8, 2026

    @schizophrenicmaniac

    Hi, I'd like to work on this. deleteThreadMessage in deleteMessage.ts only decrements tcount on the parent via decreaseReplyCountById, so tcount/tlm/replies stay set and it still looks like a thread. I'd unset those fields once the count hits 0 and add a test for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions