mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
import_data: Do some quick verification of Slack import formats.
This commit is contained in:
committed by
Tim Abbott
parent
b303477e86
commit
19db2fa773
@@ -1293,6 +1293,9 @@ def do_convert_data(slack_zip_file: str, output_dir: str, token: str, threads: i
|
||||
|
||||
subprocess.check_call(["unzip", "-q", slack_zip_file, "-d", slack_data_dir])
|
||||
|
||||
if not os.path.isfile(os.path.join(slack_data_dir, "channels.json")):
|
||||
raise ValueError(f"{original_path} does not have the layout we expect from a Slack export!")
|
||||
|
||||
# We get the user data from the legacy token method of Slack API, which is depreciated
|
||||
# but we use it as the user email data is provided only in this method
|
||||
user_list = get_slack_api_data("https://slack.com/api/users.list", "members", token=token)
|
||||
|
Reference in New Issue
Block a user