From 3853a65a4c93261616687dae3cf7640126fe9387 Mon Sep 17 00:00:00 2001 From: jai2201 Date: Fri, 15 Jul 2022 06:31:24 +0530 Subject: [PATCH] compose: Avoid hardcoding maxlength for stream/topic names. Note that previously, the limit for stream names was 30, even though stream names have been up to 60 characters in length for years. --- static/js/ui_init.js | 2 ++ static/templates/compose.hbs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/ui_init.js b/static/js/ui_init.js index 6da266f059..11a0ea9222 100644 --- a/static/js/ui_init.js +++ b/static/js/ui_init.js @@ -209,6 +209,8 @@ function initialize_compose_box() { : "End", narrow_to_compose_recipients_key_html: (common.has_mac_keyboard() ? "⌘" : "Ctrl") + " + .", + max_stream_name_length: page_params.max_stream_name_length, + max_topic_length: page_params.max_topic_length, }), ); $(`.enter_sends_${user_settings.enter_sends}`).show(); diff --git a/static/templates/compose.hbs b/static/templates/compose.hbs index 9fb7388df8..b3e5726581 100644 --- a/static/templates/compose.hbs +++ b/static/templates/compose.hbs @@ -79,9 +79,9 @@ - + - +