mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
rocketchat: Ignore rocketchat attachments without types.
Not sure where those come from since we discovered this with production data. There only was a single instance of this in my entire batch of data in an old message from the time when we started using Rocket.Chat. This might be an old issue or it might require some special settings that were later changed. Signed-off-by: Florian Pritz <bluewind@xinu.at>
This commit is contained in:
committed by
Tim Abbott
parent
5ec8f4ef09
commit
3a27919b5b
@@ -370,6 +370,10 @@ def process_message_attachment(
|
||||
logging.info("Skipping unknown attachment of message_id: %s", message_id)
|
||||
return "", False
|
||||
|
||||
if "type" not in upload: # nocoverage
|
||||
logging.info("Skipping attachment without type of message_id: %s", message_id)
|
||||
return "", False
|
||||
|
||||
upload_file_data = upload_id_to_upload_data_map[upload["_id"]]
|
||||
file_name = upload["name"]
|
||||
file_ext = f'.{upload["type"].split("/")[-1]}'
|
||||
|
||||
Reference in New Issue
Block a user