compose.js: Use get_subscriber_count in show_all_everyone_warning().

This commit is contained in:
Aditya Bansal 2017-06-30 02:24:14 +05:30
parent f60d4849b7
commit 28ec32d757
1 changed files with 1 additions and 2 deletions

View File

@ -43,8 +43,7 @@ function clear_out_file_list(jq_file_list) {
} }
function show_all_everyone_warnings() { function show_all_everyone_warnings() {
var current_stream = stream_data.get_sub(compose_state.stream_name()); var stream_count = stream_data.get_subscriber_count(compose_state.stream_name()) || 0;
var stream_count = current_stream.subscribers.num_items();
var all_everyone_template = templates.render("compose_all_everyone", {count: stream_count}); var all_everyone_template = templates.render("compose_all_everyone", {count: stream_count});
var error_area_all_everyone = $("#compose-all-everyone"); var error_area_all_everyone = $("#compose-all-everyone");