RocketChat / RocketChat/Rocket.Chat
bug: Forwarded message attachment persists when message text is cleared during edit
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When a message is forwarded to a channel and then edited with all content removed, pressing enter has no effect. Also the forwarded message attachment persists even though text content is empty.
Steps to reproduce:
- Forward any message to a channel
- Click edit on the forwarded message
- Editor shows raw markdown:
- Delete all text completely until editor is empty
- Press enter or click send
Expected behavior:
The message should update successfully. Either the attachment should be removed, or the editor should handle empty text and existing attachment.
Actual behavior:
Nothing happens. Edit mode exits and the forwarded message remains completely unchanged.
Server Setup Information:
- Version of Rocket.Chat Server: latest develop branch
- License Type: community
- Number of Users: 1
- Operating System: Ubuntu (WSL)
- Deployment Method: Source (local development)
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 22.16.0
- MongoDB Version: 6.0.x
Client Setup Information
- Desktop App or Browser Version: Chrome latest
- Operating System: Windows 11
Additional context
If the forwarded message is edited again with new content, the edit works correctly and forward attachment disappears. Therefore, the issue only occurs when the text is completely empty.
Relevant logs:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the forwarding and edit flow in Chrome using the editor steps described in the issue, then trace how an empty edited message is submitted. Verify the behavior when all text is removed and confirm that the message updates with the forwarded attachment removed or that empty text with an existing attachment is handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100