mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 09:51:24 -06:00
Merge pull request #1119 from MarksonSolutions/develop
send audio using sendWhatsAppAudio route, wabussines
This commit is contained in:
commit
16daf9be8f
@ -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