mirror of
https://github.com/zulip/zulip.git
synced 2026-06-21 21:32:29 +08:00
stream_create: Allow web public stream creation.
This commit is contained in:
parent
3f9a404fb4
commit
bed7c672ce
@ -170,26 +170,39 @@ function create_stream() {
|
||||
|
||||
let invite_only;
|
||||
let history_public_to_subscribers;
|
||||
let is_web_public;
|
||||
const privacy_setting = $("#stream_creation_form input[name=privacy]:checked").val();
|
||||
|
||||
switch (privacy_setting) {
|
||||
case "invite-only": {
|
||||
invite_only = true;
|
||||
history_public_to_subscribers = false;
|
||||
is_web_public = false;
|
||||
|
||||
break;
|
||||
}
|
||||
case "invite-only-public-history": {
|
||||
invite_only = true;
|
||||
history_public_to_subscribers = true;
|
||||
is_web_public = false;
|
||||
|
||||
break;
|
||||
}
|
||||
case "web-public": {
|
||||
invite_only = false;
|
||||
history_public_to_subscribers = true;
|
||||
is_web_public = true;
|
||||
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
invite_only = false;
|
||||
history_public_to_subscribers = true;
|
||||
is_web_public = false;
|
||||
}
|
||||
}
|
||||
|
||||
data.is_web_public = JSON.stringify(is_web_public);
|
||||
data.invite_only = JSON.stringify(invite_only);
|
||||
data.history_public_to_subscribers = JSON.stringify(history_public_to_subscribers);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user