import: Remove skipping of too-long messages during import.

This commit eliminates the skipping of messages longer than 10K characters during the import process.
This commit is contained in:
Harsh 2024-11-08 04:19:29 +05:30 committed by Tim Abbott
parent 4038832889
commit e468818d2b
2 changed files with 0 additions and 8 deletions

View File

@ -442,10 +442,6 @@ def process_raw_message_batch(
# html2text is GPL licensed, so run it as a subprocess. # html2text is GPL licensed, so run it as a subprocess.
content = subprocess.check_output(["html2text", "--unicode-snob"], input=content, text=True) 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"] date_sent = raw_message["date_sent"]
sender_user_id = raw_message["sender_id"] sender_user_id = raw_message["sender_id"]
if "channel_name" in raw_message: if "channel_name" in raw_message:

View File

@ -513,10 +513,6 @@ def process_raw_message_batch(
rc_channel_mention_data=raw_message["rc_channel_mention_data"], 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"] date_sent = raw_message["date_sent"]
sender_user_id = raw_message["sender_id"] sender_user_id = raw_message["sender_id"]
recipient_id = raw_message["recipient_id"] recipient_id = raw_message["recipient_id"]