mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
Move checking all/everyone message to util.js module.
Create is_all_or_everyone_mentioned function in util.js.
This commit is contained in:
@@ -232,6 +232,11 @@ exports.execute_early = function (func) {
|
||||
}
|
||||
};
|
||||
|
||||
exports.is_all_or_everyone_mentioned = function (message_content) {
|
||||
var all_everyone_re = /(@\*{2}(all|everyone)\*{2})|(@(all|everyone))/;
|
||||
return all_everyone_re.test(message_content);
|
||||
};
|
||||
|
||||
return exports;
|
||||
}());
|
||||
if (typeof module !== 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user