0
0
Fork 1
mirror of https://github.com/tulir/mautrix-whatsapp synced 2024-12-15 01:43:49 +01:00

Use low-res thumbnail for url previews if full image isn't available

This commit is contained in:
Tulir Asokan 2022-02-15 13:37:05 +02:00
parent d257c80327
commit 6b8d478305

View file

@ -74,7 +74,8 @@ func (portal *Portal) convertURLPreviewToBeeper(intent *appservice.IntentAPI, so
if err != nil { if err != nil {
portal.log.Warnfln("Failed to download thumbnail for link preview: %v", err) 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 thumbnailData = msg.JpegThumbnail
} }
if thumbnailData != nil { if thumbnailData != nil {