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: Skip files where file_access: access_denied.

Matt Kellerc5f106ce1be7
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
index da52a6a307a..0873b90fff1 100755
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -1034,6 +1034,11 @@ def process_message_files(
# that are hidden because of 10k cap in free plan.
continue
+ if fileinfo.get("file_access", "") == "access_denied":
+ # Slack sometimes includes file stubs for files it declares
+ # inaccessible and does not further reference.
+ continue
+
url = fileinfo["url_private"]
if "files.slack.com" in url: