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 d4e8cb9 + b4b13d3 commit fc231c8Copy full SHA for fc231c8
src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts
@@ -2188,9 +2188,9 @@ export class BaileysStartupService extends ChannelStartupService {
2188
2189
if (file?.buffer) {
2190
mediaData.audio = file.buffer.toString('base64');
2191
- } else {
2192
- console.error('File or buffer is undefined.');
2193
- 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');
2194
}
2195
2196
if (!data?.encoding && data?.encoding !== false) {
0 commit comments