send audio using sendWhatsAppAudio route, wabussines

This commit is contained in:
MarksonSolutions 2024-12-20 16:00:15 -04:00
parent d5c2cfb4f9
commit bfba702fde

View File

@ -1100,7 +1100,11 @@ export class BusinessStartupService extends ChannelStartupService {
if (file?.buffer) {
mediaData.audio = file.buffer.toString('base64');
} else {
}
else if(isURL(mediaData.audio)){
mediaData.audio = mediaData.audio
}
else {
console.error('El archivo no tiene buffer o file es undefined');
throw new Error('File or buffer is undefined');
}