RocketChat / RocketChat/Rocket.Chat
Renaming discussions containing spaces does not work
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Discussions containing a space in the name can be created, but not renamed.
Steps to reproduce:
- Create a discussion containing a space in the name
- Try to rename it to another name containing a space
Expected behavior:
The discussion is succesfully renamed
Actual behavior:
error-invalid-room-name
Server Setup Information:
- Version of Rocket.Chat Server: 6.5.2
- Operating System: Ubuntu 22.04.3 LTS
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: enabled
- NodeJS Version: 14.21.3
- MongoDB Version: 6.0.13
Client Setup Information
Not relevant, happens to multiple users inside the org with entirely different configurations
Additional context
This only happens when UI_Allow_room_names_with_special_chars is set to false, which is the default. A workaround is to temporarily enable this setting.
Relevant logs:
{
"success": false,
"error": "test new name is not a valid room name. [error-invalid-room-name]",
"errorType": "error-invalid-room-name",
"details": {
"function": "RocketChat.getValidRoomName",
"channel_name": "test new name"
}
}
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
Start by tracing the RocketChat.getValidRoomName entry point named in the log and the discussion-renaming path. Reproduce the rename with UI_Allow_room_names_with_special_chars set to false, then verify that names containing spaces are accepted consistently when renaming.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100