From fe00145d1c136358a87fe47d13462d997015ed86 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 6 Mar 2018 15:13:13 +0200 Subject: [PATCH] Fix bridging documents without thumbnails --- mautrix_telegram/portal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mautrix_telegram/portal.py b/mautrix_telegram/portal.py index bbd13273..25e642e1 100644 --- a/mautrix_telegram/portal.py +++ b/mautrix_telegram/portal.py @@ -870,7 +870,7 @@ class Portal: "size": document.size, "mimetype": mime_type, } - if document.thumb: + if document.thumb and not isinstance(document.thumb, PhotoSizeEmpty): thumbnail = await util.transfer_file_to_matrix(self.db, source.client, intent, document.thumb.location) info["thumbnail_info"] = {