diff --git a/assets/chat/js/autocomplete.js b/assets/chat/js/autocomplete.js index 3ff9cd3f..40156af1 100644 --- a/assets/chat/js/autocomplete.js +++ b/assets/chat/js/autocomplete.js @@ -39,7 +39,7 @@ function buildSearchCriteria(str, offset) { if (endCaret > -1) post = post.substring(0, endCaret); // Ignore the first char as part of the search and flag as a user only search - if (pre.lastIndexOf('@') === 0) { + if (pre.lastIndexOf('@') === 0 || pre.lastIndexOf('>') === 0) { startCaret += 1; pre = pre.substring(1); useronly = true; diff --git a/assets/chat/js/formatters/MentionedUserFormatter.js b/assets/chat/js/formatters/MentionedUserFormatter.js index ef72515f..8639d775 100644 --- a/assets/chat/js/formatters/MentionedUserFormatter.js +++ b/assets/chat/js/formatters/MentionedUserFormatter.js @@ -3,7 +3,7 @@ export default class MentionedUserFormatter { if (message && message.mentioned && message.mentioned.length > 0) { return str.replace( new RegExp( - `((?:^|\\s)@?)(${message.mentioned.join('|')})(?=$|\\s|[.?!,'])`, + `((?:^|\\s)@?|>)(${message.mentioned.join('|')})(?=$|\\s|[.?!,'])`, 'igm', ), `$1$2`, diff --git a/assets/chat/js/regex.js b/assets/chat/js/regex.js index 2c66a303..e1dbfc87 100644 --- a/assets/chat/js/regex.js +++ b/assets/chat/js/regex.js @@ -39,7 +39,7 @@ const linkregex = new RegExp(relaxed, 'gi'); const regexslashcmd = /^\/([a-z0-9]+)[\s]?/i; const regextime = /(?\d+)(?s(econds?)?$|m(inutes?)?$|h(ours?)?$|d(ays?)?$)?/i; -const nickmessageregex = /(?=@?)(\w{3,20})/g; +const nickmessageregex = /(?=[@>]?)(\w{3,20})/g; const nickregex = /^\w{3,20}$/; const nsfwregex = /\bNSFW\b/i; const nsflregex = /\bNSFL\b/i;