Skip to content

Conversation

@nickvergessen
Copy link
Member

Steps

  1. Post message Mention to @sub and @subname
  2. Post message Mention to @subname and @sub
Before After
Bildschirmfoto von 2021-01-28 16-03-05 Bildschirmfoto von 2021-01-28 16-02-52

@nickvergessen nickvergessen added this to the 💚 Next Alpha (21) milestone Jan 28, 2021
@nickvergessen nickvergessen force-pushed the bugfix/noid/mention-sub-name-users branch from f26714c to 98a4270 Compare January 28, 2021 15:22
@nickvergessen
Copy link
Member Author

/backport to stable20.1

@nickvergessen
Copy link
Member Author

/backport to stable20

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using \b (word boundary)) does not cover all the valid characters in a user name. I have added unit tests that show the issue.

@nickvergessen
Copy link
Member Author

Then I guess we should indeed sort by length first, because Hi @sub. is more likely than 2 users sub and sub.name and will get quite complexe to match otherwise.

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass and code looks good.

Allowing quotes also for user names without spaces should be fine, so 👍

@nickvergessen nickvergessen force-pushed the bugfix/noid/mention-sub-name-users branch from a08d0f9 to e65fa8d Compare January 29, 2021 10:15
@nickvergessen
Copy link
Member Author

Fixing up

@nickvergessen nickvergessen merged commit 6c229f7 into master Jan 29, 2021
@nickvergessen nickvergessen deleted the bugfix/noid/mention-sub-name-users branch January 29, 2021 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants