Explorar o código

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

Tulir Asokan %!s(int64=3) %!d(string=hai) anos
pai
achega
6b8d478305
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      urlpreview.go

+ 2 - 1
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 {