Skip to content

Commit 16daf9b

Browse files
Merge pull request #1119 from MarksonSolutions/develop
send audio using sendWhatsAppAudio route, wabussines
2 parents d5c2cfb + bfba702 commit 16daf9b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/integrations/channel/meta/whatsapp.business.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,11 @@ export class BusinessStartupService extends ChannelStartupService {
11001100

11011101
if (file?.buffer) {
11021102
mediaData.audio = file.buffer.toString('base64');
1103-
} else {
1103+
}
1104+
else if(isURL(mediaData.audio)){
1105+
mediaData.audio = mediaData.audio
1106+
}
1107+
else {
11041108
console.error('El archivo no tiene buffer o file es undefined');
11051109
throw new Error('File or buffer is undefined');
11061110
}

0 commit comments

Comments
 (0)