stream: Notify all users with metadata access when unarchiving.

This commit is contained in:
Shubham Padia
2025-02-12 12:39:12 +00:00
committed by Tim Abbott
parent 1db2487f1c
commit 552b464de7
2 changed files with 50 additions and 27 deletions

View File

@@ -269,15 +269,7 @@ def do_unarchive_stream(stream: Stream, new_name: str, *, acting_user: UserProfi
recent_traffic = get_streams_traffic({stream.id}, realm)
subscribed_user_ids = {sub.user_profile.id for sub in stream_subscribers}
admin_user_and_bot_ids = {user.id for user in realm.get_admin_users_and_bots()}
notify_user_ids = list(
admin_user_and_bot_ids
| subscribed_user_ids
| get_user_ids_with_metadata_access_via_permission_groups(stream)
)
notify_user_ids = list(can_access_stream_metadata_user_ids(stream))
setting_groups_dict = get_group_setting_value_dict_for_streams([stream])
send_stream_creation_event(realm, stream, notify_user_ids, recent_traffic, setting_groups_dict)