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'.
This commit is contained in:
Davidson Gomes 2024-07-13 16:12:16 -03:00
parent db1ab7404b
commit d80b0d14ac

View File

@ -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>('S3').ENABLE && isMedia) {
const buffer = await downloadMediaMessage(
{ key: received.key, message: received?.message },
'buffer',