RocketChat / RocketChat/Rocket.Chat
API 4.8.0 - With Allow Special Characters in Room Names true - now name for rooms can be uppercase?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Servers that have Layout - >Allow Special Characters in Room Names: TRUE
After updating to 4.8.0 rooms created have uppercase characters in the sanitized name (name not fname) field. This means that throughout the system you now have to match the uppercase letters for room names when using # (such as API and integrations).
So if I create a room called "Room 123" sanitized name will now be: #Room-123 instead of expected as previous version #room-123 and API calls quering roomName: #room-123 will result with status fail - room not found.
Same goes if I create an integration, and use room name #room-123 it will say "Bad Request", if I put #Room-123 it will now work.
Steps to reproduce:
- Turn on Allow Special Characters in Room Names (Layout ->Allow Special Characters in Room Names: TRUE)
- Create a room called Room 123
- Try to create an outbound integration using channel: #room-123 (You will see Bad Request).
Expected behavior:
It should sanitize the name of the room to be all lowercase like it did pre 4.8.0
Actual behavior:
It leaves the "name" of the room uppercase.
Server Setup Information:
- Version of Rocket.Chat Server: 4.8.0
- Operating System: Debian 11
- Deployment Method: tar
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.18.2
- MongoDB Version: 4.2.19 / wiredTiger
Client Setup Information
- Desktop App or Browser Version: All
- Operating System: Windows/Android
Additional context
I'm not sure if this was an intentional change, rooms created pre 4.8.0 upgrade are all lowercase, and rooms created post 4.8.0 upgrade are Uppercase and lowercase, making using the API via query parameters such as roomName fail when using the wrong case (expected to be lowercase as before) for room names.
Relevant logs:
No 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
Start by reproducing the issue with Allow Special Characters in Room Names enabled, then trace room-name sanitization from room creation through outbound integration and API roomName lookup. Compare the 4.8.0 behavior with the pre-4.8.0 lowercase behavior; done means newly sanitized names are lowercase and lowercase API and integration queries resolve correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100