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

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
nolramaf 2025-09-01 19:49:55 -03:00 committed by GitHub
parent 293f655274
commit e48e878b4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -460,7 +460,11 @@ export class BusinessStartupService extends ChannelStartupService {
}
if (mediaType == 'video' && !this.configService.get<S3>('S3').SAVE_VIDEO) {
throw new Error('Video upload is disabled.');
this.logger?.info?.('Video upload attempted but is disabled by configuration.');
return {
success: false,
message: 'Video upload is currently disabled. Please contact support if you need this feature enabled.',
};
}
const mimetype = result.data?.mime_type || result.headers['content-type'];