File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
src/api/integrations/channel/whatsapp Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -2244,23 +2244,12 @@ export class BaileysStartupService extends ChannelStartupService {
22442244
22452245 const image = previewData . images && previewData . images . length > 0 ? previewData . images [ 0 ] : undefined ;
22462246
2247- let thumbnail : Buffer | undefined = undefined ;
2248- if ( image ) {
2249- try {
2250- const response = await axios . get ( image , { responseType : 'arraybuffer' } ) ;
2251- thumbnail = Buffer . from ( response . data ) ;
2252- } catch {
2253- // Ignore image fetch failures
2254- }
2255- }
2256-
22572247 return {
22582248 externalAdReply : {
22592249 title : previewData . title ,
22602250 body : previewData . description ,
2261- mediaType : 1 , // 1 for image, 2 for video. Using 1 for better cover image support with renderLargerThumbnail
2251+ mediaType : 2 , // 2 for video/ image preview, though usually 1 is for thumbnail
22622252 thumbnailUrl : image ,
2263- thumbnail : thumbnail ,
22642253 sourceUrl : url ,
22652254 mediaUrl : url ,
22662255 renderLargerThumbnail : true
You can’t perform that action at this time.
0 commit comments