Rocket.chat: Usernames are case-sensitive when mentioning someone

Created on 6 Feb 2019  路  10Comments  路  Source: RocketChat/Rocket.Chat

Description:

When creating users in RocketChat they are treated case insensitive, e.g. I can't create two users with the username "foo" and "Foo". But apparently when mentioning someone in a channel, it only gets converted to a highlight if one uses the correct case. This bites a lot of our customers because to to pretty short names some of them just type the message including the highlight instead of using the autocompletion dropdown.

screenshot 2019-02-05 at 17 38 52

Steps to reproduce:

  1. Create a user called "foo"
  2. Go to a channel and mention "@Foo"

Expected behavior:

The user "foo" gets a mention because usernames are case-insensitive in the rest of the system

Actual behavior:

No mention is created.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.74.0
  • Operating System: Linux
  • Deployment Method: Hosted Cloud Version
  • NodeJS Version: v8.11.4
Planned Triaged message message rendering uux improvement

Most helpful comment

@fleaz I have done the changes. Please review my PR #16487 :)
I have attached gif for the changes too.

All 10 comments

Gretings @fleaz if I got you correctly,
we can not create a user Example and another example.
if say user Example truly exist
then when we mention example we don't get a tag. Whereas if mention Example we get a tag??

Gretings @fleaz if I got you correctly,
we can not create a user Example and another example.
if say user Example truly exist
then when we mention example we don't get a tag. Whereas if mention Example we get a tag??

This is correct, yes :)

If you take a look at my screenshot the two users felix and TestKunde exist. But the mentioning of @Felix oder @testkunde didn't create a highlight

Can you test the search on https://open.rocket.chat/ as it seems to be case insensitive there?

I can search on both Reetp and reetp and get the same result? Both get highlighted in the message?

Can you test the search on https://open.rocket.chat/ as it seems to be case insensitive there?

I can search on both Reetp and reetp and get the same result? Both get highlighted in the message?

Yes @reetp I found out so this is what I got by trying on the #sandbox pane

case sensitive

As stated in my initial description of this issue, it only occures when you type the username by hand and not use the autocompletion popup which appers while you start typing.

Especially for short names (e.g. tom) it's faster to just keep writing instead of dealing with the popup and selecting the right user

I am working on this. Will submit a PR soon :)

Can I get some help here on how to go about it? I have understood the flow but can't test it properly. I can't run console.log() in Rocket.Chat/packages/rocketchat-mentions/server/Mentions.js. The fix will be there only I suppose.

Can anybody help @algomaster99 with this?

Our customer are running into this issue regularly :(

I am working on it.

@fleaz I have done the changes. Please review my PR #16487 :)
I have attached gif for the changes too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tanc picture tanc  路  3Comments

Kiran-Rao picture Kiran-Rao  路  3Comments

royalaid picture royalaid  路  3Comments

Buzzele picture Buzzele  路  3Comments

engelgabriel picture engelgabriel  路  3Comments