Skip to content

Commit

Permalink
fix: User Mentioning when prepending the username with > (#28875)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Costa <hugocarreiracosta@gmail.com>
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
  • Loading branch information
3 people committed Aug 22, 2023
1 parent f83ea5d commit e4837a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/user-mention.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed user mentioning when prepending the username with `>`
2 changes: 1 addition & 1 deletion apps/meteor/app/mentions/lib/MentionsParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class MentionsParser {
}

get userMentionRegex() {
return new RegExp(`(^|\\s|> ?)@(${this.pattern}(@(${this.pattern}))?(:([0-9a-zA-Z-_.]+))?)`, 'gm');
return new RegExp(`(^|\\s|>)@(${this.pattern}(@(${this.pattern}))?(:([0-9a-zA-Z-_.]+))?)`, 'gm');
}

get channelMentionRegex() {
Expand Down

0 comments on commit e4837a1

Please sign in to comment.