From 7595c522c4193dc6bb6c58efa722c757160862ff Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 19 Jul 2020 15:34:06 -0400 Subject: [PATCH] Fix image upload without thumbnail --- src/backend/matrix_client.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index 00336fc1..52397e47 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -627,9 +627,12 @@ class MatrixClient(nio.AsyncClient): upload_item = Upload(item_uuid) self.models[room_id, "uploads"][str(item_uuid)] = upload_item - transaction_id = uuid4() - path = Path(await path() if callable(path) else path) - encrypt = room_id in self.encrypted_rooms + transaction_id = uuid4() + path = Path(await path() if callable(path) else path) + encrypt = room_id in self.encrypted_rooms + + thumb_crypt_dict: Dict[str, Any] = {} + crypt_dict: Dict[str, Any] = {} try: size = path.resolve().stat().st_size