create_user: Fix comment in set_up_streams_for_new_human_user.

This commit fixes comment about subscribing to default streams
in set_up_streams_for_new_human_user to explain the current
logic after changes in 69ba580a54.
This commit is contained in:
Sahil Batra 2024-05-22 13:08:08 +05:30 committed by Tim Abbott
parent 37afad038c
commit 5737d4c483
1 changed files with 5 additions and 5 deletions

View File

@ -140,11 +140,11 @@ def set_up_streams_for_new_human_user(
acting_user = None
if add_initial_stream_subscriptions:
# If the Preregistration object didn't explicitly list some streams (it
# happens when user directly signs up without any invitation), we add the
# default streams for the realm. Note that we are fine with "slim" Stream
# objects for calling bulk_add_subscriptions and add_new_user_history,
# which we verify in StreamSetupTest tests that check query counts.
# If prereg_user.include_realm_default_subscriptions is true, we
# add the default streams for the realm to the list of streams.
# Note that we are fine with "slim" Stream objects for calling
# bulk_add_subscriptions and add_new_user_history, which we verify
# in StreamSetupTest tests that check query counts.
if prereg_user is None or prereg_user.include_realm_default_subscriptions:
default_streams = get_slim_realm_default_streams(realm.id)
streams = list(set(streams) | set(default_streams))