Skip to content

Commit 91d01fa

Browse files
committed
feat: implement new Baileys features including PTV messages, poll decryption, and channel fetching
1 parent c5df499 commit 91d01fa

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)