mirror of https://github.com/zulip/zulip.git
stream: Fix message on clicking add button with empty subscribers form.
This commit corrects the message shown when we click the add button for subscribing users to stream with empty input. We show 'No user to subscribe.' as the message when trying to add subscribers with empty input. Fixes #15450.
This commit is contained in:
parent
3e1a0c0e32
commit
318bc0ca1e
|
@ -636,6 +636,12 @@ exports.initialize = function () {
|
|||
const user_ids = user_pill.get_user_ids(exports.pill_widget);
|
||||
const stream_subscription_info_elem = $('.stream_subscription_info').expectOne();
|
||||
|
||||
if (user_ids.length === 0) {
|
||||
stream_subscription_info_elem.text(i18n.t("No user to subscribe."))
|
||||
.addClass("text-error").removeClass("text-success");
|
||||
return;
|
||||
}
|
||||
|
||||
function invite_success(data) {
|
||||
exports.pill_widget.clear();
|
||||
if (!Object.entries(data.already_subscribed).length) {
|
||||
|
|
Loading…
Reference in New Issue