Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The new message template cannot resolve pointer usernames that contain @ character #26869

Closed
Gummikavalier opened this issue Sep 14, 2022 · 4 comments

Comments

@Gummikavalier
Copy link

Gummikavalier commented Sep 14, 2022

Description:

The new message template cannot "resolve" user names in the message pointers should they contain @ character in the target's username.

Especially the systems that use emails as their main username attribute suffer from the issue. Also those Oauth enabled instances that get the user names in format such as username@example.com.

In this issue example the username is called 099fnd2ee@example.com. The real name is Test Account.

Steps to reproduce:

  1. Set RC to user real names by default under Layout -> User Interface -> Use Real Name
  2. Create account with username that contains @ character. Set the name and email separately to something else.
  3. Send a message to the user that has @ character in their username

Expected behavior:

The pointer string should show the real name (Test Account) and also have it highlighted.

Actual behavior:

The username is shown instead of the real name and it is not highlighted.

Screenshot from 2022-09-14 15-25-14

Server Setup Information:

  • Version of Rocket.Chat Server: 5.1.2
  • Operating System: RHEL8
  • Deployment Method: tar
  • Number of Running Instances: 10
  • DB Replicaset Oplog: Yes
  • NodeJS Version: 14.19.3
  • MongoDB Version: 4.4

Client Setup Information

  • Desktop App or Browser Version: Any browser
@Gummikavalier Gummikavalier changed the title The new message template cannot resolve names of user accounts that contain have @ character The new message template cannot resolve pointer usernames that contain @ character Sep 14, 2022
@hugocostadev
Copy link
Contributor

Hi @Gummikavalier , thanks for your concern.

Let me ask you a question, do you even got it to create a username with an email pattern?
When I tried to replicate this issue I got an error:
image

@Gummikavalier
Copy link
Author

@hugocostadev Yes. In our case the usernames get created by Oauth provisioning and we also have allowed @ character in the UTF-8 slugify options. Like this:

Admin -> General -> UTF8

On both validation fields string: [0-9a-zA-Z-_.@-]+

UTF8 Names Slugify 'on'

Sorry that I forgot to add that into the original issue.

@hugocostadev
Copy link
Contributor

Got it @Gummikavalier ! Thank you for your feedback, I'll address this issue internally!

@Gummikavalier
Copy link
Author

Confirmed working on RC 5.4.0. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants