Skip to content

Commit

Permalink
send audio using sendWhatsAppAudio route, wabussines
Browse files Browse the repository at this point in the history
  • Loading branch information
MarksonSolutions committed Dec 20, 2024
1 parent d5c2cfb commit bfba702
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit bfba702

Please sign in to comment.