RocketChat / RocketChat/Rocket.Chat

[BUG] Multiple private channels with the same name are forbidden

Open
#11,492 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Two seperate users cannot create a private channel with the same name.
This makes no sense because for example, a family could make a private channel called "family" and no other family could make a channel with the same name.

It appears that the name of a channel is used as an ID and this is a flaw in design. This is mentioned in #5418.

Unique IDs for channels could be generated a number of ways, like with hashes, numbers, adding a prefix/suffix to duplicate names.

Relevant issue:
#5418

Steps to reproduce:
  1. Create a private channel with name X.
  2. Create another private channel with name X.
Expected behavior:

Multiple private channels with the same name can coexist.

Actual behavior:

Create channel page doesn't allow me to create a private channel if the name already exists for a different private channel.

Server Setup Information:
  • Version of Rocket.Chat Server: 0.66.0
  • Operating System: Fedora 28
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Disabled
  • NodeJS Version: official Docker container
  • MongoDB Version: official Docker container

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the related issue #5418 and reproduce the conflict by creating two private channels with the same name. Trace how private channel names are used during creation and persistence, then verify that distinct private channels with identical names can coexist without breaking existing channel lookup behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mongodb, node.js, typescript
Domain
backend-api-design, databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.