From c3cf1cd9d870cb2217c5fdff605b5ec5cdca7c59 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 25 Jul 2023 19:29:42 +0000 Subject: [PATCH] data_import: Skip Slack "Posts" which we don't otherwise support. --- zerver/data_import/slack.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py index 4f1ae26b61..44c7505c30 100644 --- a/zerver/data_import/slack.py +++ b/zerver/data_import/slack.py @@ -822,6 +822,11 @@ def get_messages_iterator( # change this to point to slackbot instead, but # skipping those messages is simpler. continue + if message.get("mimetype") == "application/vnd.slack-docs": + # This is a Slack "Post" which is HTML-formatted, + # and we don't have a clean way to import at the + # moment. We skip them on import. + continue if dir_name in added_channels: message["channel_name"] = dir_name elif dir_name in added_mpims: