mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
compose: Rename all_everyone_warn_threshold.
We rename all_everyone_warn_threshold to wildcard_mention_large_stream_threshold as we would be adding wildcard_mention_policy and this constant will also be used to show error in case when wildcard_mention_policy is set to admins only.
This commit is contained in:
@@ -27,7 +27,7 @@ let user_acknowledged_announce;
|
||||
let wildcard_mention;
|
||||
let uppy;
|
||||
|
||||
exports.all_everyone_warn_threshold = 15;
|
||||
exports.wildcard_mention_large_stream_threshold = 15;
|
||||
exports.announce_warn_threshold = 60;
|
||||
|
||||
exports.uploads_domain = document.location.protocol + "//" + document.location.host;
|
||||
@@ -485,7 +485,10 @@ function validate_stream_message_mentions(stream_id) {
|
||||
const stream_count = stream_data.get_subscriber_count(stream_id) || 0;
|
||||
|
||||
// check if wildcard_mention has any mention and henceforth execute the warning message.
|
||||
if (wildcard_mention !== null && stream_count > exports.all_everyone_warn_threshold) {
|
||||
if (
|
||||
wildcard_mention !== null &&
|
||||
stream_count > exports.wildcard_mention_large_stream_threshold
|
||||
) {
|
||||
if (
|
||||
user_acknowledged_all_everyone === undefined ||
|
||||
user_acknowledged_all_everyone === false
|
||||
|
||||
Reference in New Issue
Block a user