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) {
|
||||
const [image] = info.images
|
||||
|
||||
const jpegThumbnail = image
|
||||
? await getCompressedJpegThumbnail(image, opts)
|
||||
: undefined
|
||||
let jpegThumbnail: Buffer | undefined = undefined
|
||||
try {
|
||||
jpegThumbnail = image
|
||||
? await getCompressedJpegThumbnail(image, opts)
|
||||
: undefined
|
||||
} catch(error) {
|
||||
}
|
||||
|
||||
return {
|
||||
'canonical-url': info.url,
|
||||
|
||||
Reference in New Issue
Block a user