do_deactivate_stream: Remove unnecessary mutations.

Streams should not be marked as private, and subscribers
of the deactivated stream should not be removed.

Update the confirmation message when archiving a stream.
This commit is contained in:
Sanchit Sharma
2024-07-07 19:01:08 +05:30
committed by Tim Abbott
parent f04fb937a3
commit 795b2ba14e
7 changed files with 102 additions and 165 deletions

View File

@@ -263,7 +263,10 @@ def check_stream_access_based_on_stream_post_policy(sender: UserProfile, stream:
def access_stream_for_send_message(
sender: UserProfile, stream: Stream, forwarder_user_profile: UserProfile | None
sender: UserProfile,
stream: Stream,
forwarder_user_profile: UserProfile | None,
archived_channel_notice: bool = False,
) -> None:
# Our caller is responsible for making sure that `stream` actually
# matches the realm of the sender.
@@ -287,6 +290,9 @@ def access_stream_for_send_message(
else:
raise JsonableError(_("User not authorized for this query"))
if archived_channel_notice:
return
if is_cross_realm_bot_email(sender.delivery_email):
return