diff --git a/web/src/util.ts b/web/src/util.ts index 3a235ab6c7..d7f47a7f17 100644 --- a/web/src/util.ts +++ b/web/src/util.ts @@ -195,11 +195,11 @@ export class CachedValue { } export function find_stream_wildcard_mentions(message_content: string): string | null { - const mention = message_content.match(/(^|\s)(@\*{2}(all|everyone|stream)\*{2})($|\s)/); + const mention = message_content.match(/(?( diff --git a/web/tests/util.test.js b/web/tests/util.test.js index 3781002211..357bd7d7df 100644 --- a/web/tests/util.test.js +++ b/web/tests/util.test.js @@ -168,6 +168,8 @@ run_test("wildcard_mentions_regexp", () => { const messages_with_everyone_mentions = [ "@**everyone**", + '"@**everyone**"', + "@**everyone**: Look at this!", "some text before @**everyone** some text after", "@**everyone** some text after only", "some text before only @**everyone**",