mirror of https://github.com/zulip/zulip.git
mattermost import: Fix handling of channels with no subscribers.
Previously, we skipped setting the list of subscribers to the channel, which could result in problems if any messages had been posted there in the past (e.g. because the channel used to have members, but now doesn't). It could be correct to skip importing dead channels altogether, but probably simpler is to just set an empty subscriber list.
This commit is contained in:
parent
dc682da47a
commit
aad99ce951
|
@ -195,11 +195,10 @@ def convert_channel_data(channel_data: List[ZerverFieldsT],
|
|||
for username in channel_members_map[stream_name]:
|
||||
channel_users.add(user_id_mapper.get(username))
|
||||
|
||||
if channel_users:
|
||||
subscriber_handler.set_info(
|
||||
users=channel_users,
|
||||
stream_id=stream_id,
|
||||
)
|
||||
subscriber_handler.set_info(
|
||||
users=channel_users,
|
||||
stream_id=stream_id,
|
||||
)
|
||||
streams.append(stream)
|
||||
return streams
|
||||
|
||||
|
|
Loading…
Reference in New Issue