mirror of https://github.com/zulip/zulip.git
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:
parent
4038832889
commit
e468818d2b
|
@ -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:
|
||||||
|
|
|
@ -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"]
|
||||||
|
|
Loading…
Reference in New Issue