We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a306f15 + c4678f3 commit b4b13d3Copy full SHA for b4b13d3
src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts
@@ -2189,9 +2189,9 @@ export class BaileysStartupService extends ChannelStartupService {
2189
2190
if (file?.buffer) {
2191
mediaData.audio = file.buffer.toString('base64');
2192
- } else {
2193
- console.error('File or buffer is undefined.');
2194
- throw new Error('File or buffer is undefined.');
+ } else if (!isURL(data.audio)) {
+ console.error('Invalid file or audio source');
+ throw new BadRequestException('File buffer or URL audio is required');
2195
}
2196
2197
if (!data?.encoding && data?.encoding !== false) {
0 commit comments