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.
The user "foo" gets a mention because usernames are case-insensitive in the rest of the system
No mention is created.
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 userExample
and anotherexample
.
if say userExample
truly exist
then when we mentionexample
we don't get a tag. Whereas if mentionExample
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
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.
Most helpful comment
@fleaz I have done the changes. Please review my PR #16487 :)
I have attached gif for the changes too.