RocketChat / RocketChat/Rocket.Chat

"UI_Allow_room_names_with_special_chars" does not translate back to fname in global search and server directory

Open
#10,995 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: ui/ux type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When the option "UI_Allow_room_names_with_special_chars" is set to true, Rocket.Chat should pick up the channel/room name based on the fname database attribute rather than the name one.

Currently it looks like this doesn't happen in the global search and the channel/room directory:

Server Setup Information:
  • Version of Rocket.Chat Server: 0.65.1
  • Operating System: Ubuntu
  • Deployment Method(snap/docker/tar/etc): Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes
  • Node Version: official Docker container
  • mongoDB Version: official Docker container
Steps to Reproduce:
  1. Setup new RC instance
  2. Make sure UI_Allow_room_names_with_special_chars is set to true (Admin -> Layout -> UI)
  3. Create a new room/channel with special UTF8 characters (chinese ones, for example: )
Expected behavior:

Special (UTF8) characters (fname attribute) should visible in the global search and channel directory.

Actual behavior:

Special character missing in global search and channel directory (name attribute is shown rather than fname).

Global search
bildschirmfoto 2018-06-04 um 11 27 54
Channel directory
bildschirmfoto 2018-06-04 um 11 28 02
Relevant logs:

Relevant Mongo entry:

{ "_id" : "3YhymvLzujPrs9Ngy", "name" : "test", "fname" : "一test", "t" : "c", "msgs" : 0, "usernames" : [ "frdmn" ], "u" : { "_id" : "929N8ZdxGDk5Xi6Ed", "username" : "frdmn" }, "customFields" : {  }, "broadcast" : false, "ts" : ISODate("2018-06-04T11:45:59.811Z"), "ro" : false, "sysMes" : true, "_updatedAt" : ISODate("2018-06-04T11:45:59.811Z") }

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

Start at the global search and channel directory entry points, tracing how each displays room data; the issue provides a MongoDB record containing both name and fname. Done when rooms with special UTF-8 characters display fname in both locations while ordinary room names continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb
Domain
frontend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.