Skip to content

Commit 9ab6f9a

Browse files
Update src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 9beb38d commit 9ab6f9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,9 @@ export class BaileysStartupService extends ChannelStartupService {
12611261
if (this.configService.get<S3>('S3').ENABLE) {
12621262
try {
12631263
if (isVideo && !this.configService.get<S3>('S3').SAVE_VIDEO) {
1264-
throw new Error('Video upload is disabled.');
1264+
this.logger.warn('Video upload is disabled. Skipping video upload.');
1265+
// Skip video upload by returning early from this block
1266+
return;
12651267
}
12661268

12671269
const message: any = received;

0 commit comments

Comments
 (0)