From e6916acf45a6597d8478cb142c727af7565e8cd1 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Sat, 13 Jul 2024 16:15:55 -0300 Subject: [PATCH] chore: Improve 'getBase64FromMediaMessage' function in Whatsapp Baileys service The 'getBase64FromMediaMessage' function in the Whatsapp Baileys service has been improved. Now, the 'getBuffer' parameter has a default value of 'false', making it optional. This change simplifies the function call and enhances readability. Modified file: - src/api/services/channels/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 3a3b1a533..b62233fb1 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -2811,7 +2811,7 @@ export class BaileysStartupService extends ChannelStartupService { } } - public async getBase64FromMediaMessage(data: getBase64FromMediaMessageDto, getBuffer: boolean) { + public async getBase64FromMediaMessage(data: getBase64FromMediaMessageDto, getBuffer = false) { try { const m = data?.message; const convertToMp4 = data?.convertToMp4 ?? false;