From e468818d2b167f7454f578110f5e06cb46fbca21 Mon Sep 17 00:00:00 2001 From: Harsh <116981900+reharsh@users.noreply.github.com> Date: Fri, 8 Nov 2024 04:19:29 +0530 Subject: [PATCH] import: Remove skipping of too-long messages during import. This commit eliminates the skipping of messages longer than 10K characters during the import process. --- zerver/data_import/mattermost.py | 4 ---- zerver/data_import/rocketchat.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/zerver/data_import/mattermost.py b/zerver/data_import/mattermost.py index af5a271a33..bfc8e1b43f 100644 --- a/zerver/data_import/mattermost.py +++ b/zerver/data_import/mattermost.py @@ -442,10 +442,6 @@ def process_raw_message_batch( # html2text is GPL licensed, so run it as a subprocess. content = subprocess.check_output(["html2text", "--unicode-snob"], input=content, text=True) - if len(content) > 10000: # nocoverage - logging.info("skipping too-long message of length %s", len(content)) - continue - date_sent = raw_message["date_sent"] sender_user_id = raw_message["sender_id"] if "channel_name" in raw_message: diff --git a/zerver/data_import/rocketchat.py b/zerver/data_import/rocketchat.py index f5affb643b..13e6205f2e 100644 --- a/zerver/data_import/rocketchat.py +++ b/zerver/data_import/rocketchat.py @@ -513,10 +513,6 @@ def process_raw_message_batch( rc_channel_mention_data=raw_message["rc_channel_mention_data"], ) - if len(content) > 10000: # nocoverage - logging.info("skipping too-long message of length %s", len(content)) - continue - date_sent = raw_message["date_sent"] sender_user_id = raw_message["sender_id"] recipient_id = raw_message["recipient_id"]