From 26fe8c4a09b65d91a715aa6281a076b49ec303c7 Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 19 Jul 2020 15:00:23 -0400 Subject: [PATCH] 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. --- src/backend/matrix_client.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index 4957c66f..00336fc1 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -823,7 +823,8 @@ class MatrixClient(nio.AsyncClient): room_id, transaction_id, event_type, - inline_content = content["body"], + inline_content = content["body"], + media_url = url, media_title = path.name, media_width = content["info"].get("w", 0), @@ -831,7 +832,11 @@ class MatrixClient(nio.AsyncClient): media_duration = content["info"].get("duration", 0), media_size = content["info"]["size"], 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 = content["info"].get("thumbnail_info", {}).get("w", 0), thumbnail_height =