mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
rocketchat: Harden parsing of custom emoji exports.
Apparently some exports have a weird `ObjectId("idstring")` typed
value here, that stringify to the actual string.
This commit is contained in:
parent
4d0448f7c6
commit
b249830715
@ -279,7 +279,7 @@ def build_custom_emoji(
|
||||
# Map emoji file_id to emoji file data
|
||||
emoji_file_data = {}
|
||||
for emoji_file in custom_emoji_data["file"]:
|
||||
emoji_file_data[emoji_file["_id"]] = {"filename": emoji_file["filename"], "chunks": []}
|
||||
emoji_file_data[str(emoji_file["_id"])] = {"filename": emoji_file["filename"], "chunks": []}
|
||||
for emoji_chunk in custom_emoji_data["chunk"]:
|
||||
emoji_file_data[emoji_chunk["files_id"]]["chunks"].append(emoji_chunk["data"])
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user