Merge pull request #1119 from MarksonSolutions/develop

send audio using sendWhatsAppAudio route, wabussines
This commit is contained in:
Davidson Gomes 2025-01-06 12:17:12 -03:00 committed by GitHub
commit 16daf9be8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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');
}