From d80b0d14ac5c64d7963673c622115093fdb6cd93 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Sat, 13 Jul 2024 16:12:16 -0300 Subject: [PATCH] chore: Whatsapp Baileys service - disable webhook media download when S3 is not enabled This change disables the download of media messages through the Whatsapp Baileys service's local webhook when the S3 storage is not enabled. This is to prevent unnecessary media downloads and potential storage issues. The modified file is 'whatsapp.baileys.service.ts'. --- src/api/services/channels/whatsapp.baileys.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index 38f0125a6..3a3b1a533 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -1048,7 +1048,7 @@ export class BaileysStartupService extends ChannelStartupService { const contentMsg = received?.message[getContentType(received.message)] as any; - if (this.localWebhook.webhookBase64 === true && isMedia) { + if (this.localWebhook.webhookBase64 === true && !this.configService.get('S3').ENABLE && isMedia) { const buffer = await downloadMediaMessage( { key: received.key, message: received?.message }, 'buffer',