Skip to content

Commit

Permalink
chore: Whatsapp Baileys service - disable webhook media download when…
Browse files Browse the repository at this point in the history
… 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'.
  • Loading branch information
dgcode-tec committed Jul 13, 2024
1 parent db1ab74 commit d80b0d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/services/channels/whatsapp.baileys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit d80b0d1

Please sign in to comment.