RocketChat / RocketChat/Rocket.Chat

Link decoration doesn't work with single word domain names

Open
#29,874 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

message rendering type: improvement
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When you post a link like https://google.com/something Rocket.Chat decorates it as a link and make it clickable.
But when you have some local network service with single-word-domain-name and link looks like http://server/documents it doesn't work as expected.

Also suggested method to add in the Workspace > Setting > Message Custom Domain Whitelist for Auto Link Setting DOES NOT WORK for a single word domain name.
f.e. http://server/documents will not be decorated even I write "server" into Workspace > Setting > Message

I know about [](link) decoration, but if you use it a hundreds of times every day it sucks.

Steps to reproduce:
  1. Open any chat
  2. Post a link like "http://server/documents"
  3. It isn't decorated and isn't clickable
Expected behavior:

Link decorated as a hyperlink and open browser when is clicked

Actual behavior:

Link looks like simple text

Server Setup Information:
  • Version of Rocket.Chat Server: 6.2.10
  • Operating System: ubuntu 18
  • Number of Running Instances: 1
Client Setup Information
  • Desktop App or Browser Version: 3.9.4
  • Operating System: windows 10

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 Workspace > Settings > Message > Custom Domain Whitelist for Auto Link and reproduce the issue with http://server/documents. Trace the message link-decoration path and its handling of single-word domains and whitelist entries. Done means such links become clickable while ordinary text remains unchanged, with coverage for the reported case.

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
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.