Include decryption dicts in m.image local echoes

Fixes local echoes for images resulting in 404s, related to the
retry fix in the previous commit.
This commit is contained in:
miruka 2020-07-19 15:00:23 -04:00
parent f1055ce5b9
commit 26fe8c4a09

View File

@ -823,7 +823,8 @@ class MatrixClient(nio.AsyncClient):
room_id, room_id,
transaction_id, transaction_id,
event_type, event_type,
inline_content = content["body"], inline_content = content["body"],
media_url = url, media_url = url,
media_title = path.name, media_title = path.name,
media_width = content["info"].get("w", 0), media_width = content["info"].get("w", 0),
@ -831,7 +832,11 @@ class MatrixClient(nio.AsyncClient):
media_duration = content["info"].get("duration", 0), media_duration = content["info"].get("duration", 0),
media_size = content["info"]["size"], media_size = content["info"]["size"],
media_mime = content["info"]["mimetype"], media_mime = content["info"]["mimetype"],
thumbnail_url = thumb_url, media_crypt_dict = crypt_dict,
thumbnail_url = thumb_url,
thumbnail_crypt_dict = thumb_crypt_dict,
thumbnail_width = thumbnail_width =
content["info"].get("thumbnail_info", {}).get("w", 0), content["info"].get("thumbnail_info", {}).get("w", 0),
thumbnail_height = thumbnail_height =