mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
do_make_stream_web_public: Update all affected fields.
Convert this function that absolutely makes a stream web public. We already have do_change_stream_invite_only to convert streams to public and private streams. We also update all the fields that should be set when a stream is made web public.
This commit is contained in:
@@ -4569,9 +4569,11 @@ def do_change_stream_invite_only(
|
||||
send_event(stream.realm, event, can_access_stream_user_ids(stream))
|
||||
|
||||
|
||||
def do_change_stream_web_public(stream: Stream, is_web_public: bool) -> None:
|
||||
stream.is_web_public = is_web_public
|
||||
stream.save(update_fields=["is_web_public"])
|
||||
def do_make_stream_web_public(stream: Stream) -> None:
|
||||
stream.is_web_public = True
|
||||
stream.invite_only = False
|
||||
stream.history_public_to_subscribers = True
|
||||
stream.save(update_fields=["invite_only", "history_public_to_subscribers", "is_web_public"])
|
||||
|
||||
|
||||
def do_change_stream_post_policy(stream: Stream, stream_post_policy: int) -> None:
|
||||
|
||||
Reference in New Issue
Block a user