mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
slack import: Fix DefaultStream import of deactivated #random.
If the #random channel in Slack is deactivated, we should follow Zulip's data model of not allowing deactivated, default streams. This had apparently happened in zulipchat.com for a few organizations, resulting in weird exceptions trying to invite new users.
This commit is contained in:
@@ -379,7 +379,7 @@ def channels_to_zerver_stream(slack_data_dir: str, realm_id: int,
|
||||
realm["zerver_stream"].append(stream)
|
||||
|
||||
slack_default_channels = ['general', 'random']
|
||||
if channel['name'] in slack_default_channels:
|
||||
if channel['name'] in slack_default_channels and not stream['deactivated']:
|
||||
defaultstream = build_defaultstream(realm_id, stream_id,
|
||||
defaultstream_id)
|
||||
realm["zerver_defaultstream"].append(defaultstream)
|
||||
|
||||
Reference in New Issue
Block a user