-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
Right now users can create usernames with capital letters, which makes sorting results not so friendly, b/c instead of ['apple', 'Banana', 'Pineapple'], we have ['Banana', 'Pineapple', 'apple']. It's extremely confusing when you have opened like 30 chats all the time and everyone follows different naming convention (at all the best option will be to replace nicknames with real names, but AFAIK there is an open PR with this feature)
So we have few possible solutions:
Disclaimer: I'm not a back-end guy, I have no idea what's are good patterns here.
-
Force users to use usernames without capital letters - for me this is best option, b/c users have to keep usernames unique, even now we can't create
@user,@USER,@Userand@UsEr, so why not make this simpler? Also this will make everything more consistent, b/c channel names are already limited to lowercase and it works as expected. -
Use
caseInsensitiveoption forensureIndexmethod, but it's available in MongoDB >= 3.3.11 -> https://jira.mongodb.org/browse/SERVER-90
AFAIK Rocket.Chat didn't fit this requirements. -
Store additional field in DB with name in lowercase and use it for sorting purposes only. I tried to make this, but without luck 😢