Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose: Add setter for wildcard_mention_large_stream_threshold.
Anders Kaseorg8947ff10a4c3
diff --git a/frontend_tests/puppeteer_tests/09-mention.ts b/frontend_tests/puppeteer_tests/09-mention.tsindex dd990ef451a..9dd60f392ad 100644--- a/frontend_tests/puppeteer_tests/09-mention.ts+++ b/frontend_tests/puppeteer_tests/09-mention.ts@@ -25,7 +25,7 @@ async function test_mention(page: Page): Promise<void> {});const threshold = await page.evaluate(() => {const compose = window.require("./static/js/compose");- compose.wildcard_mention_large_stream_threshold = 5;+ compose.set_wildcard_mention_large_stream_threshold(5);return compose.wildcard_mention_large_stream_threshold;});assert(stream_size > threshold);diff --git a/static/js/compose.js b/static/js/compose.jsindex bccb137f6d4..e42c52ccba1 100644--- a/static/js/compose.js+++ b/static/js/compose.js@@ -530,6 +530,10 @@ exports.wildcard_mention_allowed = function () {return !page_params.is_guest;};+exports.set_wildcard_mention_large_stream_threshold = function (value) {+ exports.wildcard_mention_large_stream_threshold = value;+};+function validate_stream_message_mentions(stream_id) {const stream_count = peer_data.get_subscriber_count(stream_id) || 0;