mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
streams: Remove dependency of streams on actions.
Refactored code in actions.py and streams.py to move stream related functions into streams.py and remove the dependency on actions.py. validate_sender_can_write_to_stream function in actions.py was renamed to access_stream_for_send_message in streams.py.
This commit is contained in:
@@ -7,6 +7,7 @@ from zerver.models import Realm, Stream, UserProfile, \
|
||||
Subscription, Recipient, RealmAuditLog
|
||||
from zerver.lib.create_user import create_user_profile, \
|
||||
get_display_email_address
|
||||
from zerver.lib.streams import render_stream_description
|
||||
|
||||
def bulk_create_users(realm: Realm,
|
||||
users_raw: Set[Tuple[str, str, str, bool]],
|
||||
@@ -111,7 +112,6 @@ def bulk_create_streams(realm: Realm,
|
||||
options['history_public_to_subscribers'] = (
|
||||
not options.get("invite_only", False) and not realm.is_zephyr_mirror_realm)
|
||||
if name.lower() not in existing_streams:
|
||||
from zerver.lib.actions import render_stream_description
|
||||
streams_to_create.append(
|
||||
Stream(
|
||||
realm=realm,
|
||||
|
||||
Reference in New Issue
Block a user