From 6b8d4783050ac99ae96f7e9d68bec95e88dfb400 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 15 Feb 2022 13:37:05 +0200 Subject: [PATCH] Use low-res thumbnail for url previews if full image isn't available --- urlpreview.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/urlpreview.go b/urlpreview.go index 829e298..7dff94a 100644 --- a/urlpreview.go +++ b/urlpreview.go @@ -74,7 +74,8 @@ func (portal *Portal) convertURLPreviewToBeeper(intent *appservice.IntentAPI, so if err != nil { portal.log.Warnfln("Failed to download thumbnail for link preview: %v", err) } - } else if msg.JpegThumbnail != nil { + } + if thumbnailData == nil && msg.JpegThumbnail != nil { thumbnailData = msg.JpegThumbnail } if thumbnailData != nil {