Skip to content

Commit 780ca99

Browse files
matheusmartinsInspermatheusmartinsInsper
authored andcommitted
fix: adding media verification
1 parent f12a18e commit 780ca99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,7 @@ export class BusinessStartupService extends ChannelStartupService {
912912
private async getIdMedia(mediaMessage: any) {
913913
const formData = new FormData();
914914
const media = mediaMessage.media || mediaMessage.audio;
915+
if (!media) throw new Error("Media or audio not found");
915916

916917
const fileStream = createReadStream(media);
917918

0 commit comments

Comments
 (0)