Fix thumbnail uploading for SVG files

This commit is contained in:
miruka 2020-03-09 10:03:22 -04:00
parent 61cc87cf18
commit 2307d5f1b2

View File

@ -875,7 +875,7 @@ class MatrixClient(nio.AsyncClient):
thumb_data = out.getvalue() thumb_data = out.getvalue()
thumb_size = len(thumb_data) 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() raise UneededThumbnail()
info = MatrixImageInfo(thumb.width, thumb.height, mime, thumb_size) info = MatrixImageInfo(thumb.width, thumb.height, mime, thumb_size)