mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-20 10:16:43 -06:00
send audio using sendWhatsAppAudio route, wabussines
This commit is contained in:
parent
d5c2cfb4f9
commit
bfba702fde
@ -1100,7 +1100,11 @@ export class BusinessStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
if (file?.buffer) {
|
if (file?.buffer) {
|
||||||
mediaData.audio = file.buffer.toString('base64');
|
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');
|
console.error('El archivo no tiene buffer o file es undefined');
|
||||||
throw new Error('File or buffer is undefined');
|
throw new Error('File or buffer is undefined');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user