Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

slack_import: Remove obsolete SlackImportAttachment placeholder.

rht1bbd36d1812c
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
index e5a54fe5736..bf161b56897 100755
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -1065,8 +1065,6 @@ def get_attachment_path_and_content(fileinfo: ZerverFieldsT, realm_id: int) -> T
s3_path = "/".join(
[
str(realm_id),
- "SlackImportAttachment", # This is a special placeholder which should be kept
- # in sync with 'exports.py' function 'import_message_data'
format(random.randint(0, 255), "x"),
secrets.token_urlsafe(18),
sanitize_name(fileinfo["name"]),
diff --git a/zerver/tests/test_slack_importer.py b/zerver/tests/test_slack_importer.py
index a9fd0a49366..5ec9a2a4aff 100644
--- a/zerver/tests/test_slack_importer.py
+++ b/zerver/tests/test_slack_importer.py
@@ -1131,7 +1131,6 @@ class SlackImporter(ZulipTestCase):
self.assert_length(uploads_list, 1)
image_path = zerver_attachment[0]["path_id"]
- self.assertIn("/SlackImportAttachment/", image_path)
expected_content = f"[Apple](/user_uploads/{image_path})\n[banana](example.com/banana.zip)"
self.assertEqual(info["content"], expected_content)