mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: give preview even if thumbnail gen fails
This commit is contained in:
@@ -36,9 +36,13 @@ export const getUrlInfo = async(
|
|||||||
if(info && 'title' in info) {
|
if(info && 'title' in info) {
|
||||||
const [image] = info.images
|
const [image] = info.images
|
||||||
|
|
||||||
const jpegThumbnail = image
|
let jpegThumbnail: Buffer | undefined = undefined
|
||||||
? await getCompressedJpegThumbnail(image, opts)
|
try {
|
||||||
: undefined
|
jpegThumbnail = image
|
||||||
|
? await getCompressedJpegThumbnail(image, opts)
|
||||||
|
: undefined
|
||||||
|
} catch(error) {
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'canonical-url': info.url,
|
'canonical-url': info.url,
|
||||||
|
|||||||
Reference in New Issue
Block a user