mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
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:
committed by
Tim Abbott
parent
f04fb937a3
commit
795b2ba14e
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user