-
Notifications
You must be signed in to change notification settings - Fork 135
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
Fix/28946 Mentioning an email with double @ sign results in an invalid email mention #615
Fix/28946 Mentioning an email with double @ sign results in an invalid email mention #615
Conversation
This test case is for valid text that should match for user mentions
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Hmm...I don't think I should have been assigned to this PR as I wasn't a part of the issue. Re-assigning. edit: it appears I'm unable to assign @Santhosh-Sellavel to this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'll let @Santhosh-Sellavel review too
I think the automation just isn't set up for this repo. Either way no biggie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Removed the
+
quantifier from theuserMentions
regex because this resulted in all the @ signs being matched when a mention had multiple preceding @ signs.For example, the match looked like this
@@user@expensify.com
, and clicking it showed a user with@user@expensify.com
as their email in the RHP. Trying to message this user then resulted in an error because their email address was invalid.With this change, the match now looks like this: @
@user@expensify.com
, which, upon clicking/tapping, shows the valid emailuser@expensify.com
in the RHP, so the user can now be messaged without errors.Please Note: I've altered the linking below slightly in accordance to this comment because doing it this way assigns the correct people to review.
Fixed Issues
$ Expensify/App#28946
$ Expensify/App#28946 (comment)
Tests
The 'Test for user mention with @@username@domain.com' test in
ExpensiMark-HTML-test.js
.Running
npm run test
resulted in all tests passing.In addition, typing '@@user@expensify.com' and then sending resulted in the correct match: @
@user@expensify.com
.QA
@user@expensify.com
.You can repeat the steps above in a workspace chat, group chat, thread chat, and task thread chat (minus the logging into an account step).