From 2307d5f1b2546c90b77611d179595eef825bab28 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 9 Mar 2020 10:03:22 -0400 Subject: [PATCH] Fix thumbnail uploading for SVG files --- src/backend/matrix_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index aa6f8ce5..fddd153d 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -875,7 +875,7 @@ class MatrixClient(nio.AsyncClient): thumb_data = out.getvalue() thumb_size = len(thumb_data) - if thumb_size >= len(data): + if thumb_size >= len(data) and is_jpg_png and not is_svg: raise UneededThumbnail() info = MatrixImageInfo(thumb.width, thumb.height, mime, thumb_size)