fix: obtain mediaUrl not defined

This commit is contained in:
Ygor Santana 2025-02-13 22:35:09 -03:00
parent ff77bc018a
commit 59479f9a21

View File

@ -3,7 +3,7 @@ import { configService, S3 } from '@config/env.config';
const getTypeMessage = (msg: any) => {
let mediaId: string;
if (configService.get<S3>('S3').ENABLE) mediaId = msg.message.mediaUrl;
if (configService.get<S3>('S3').ENABLE) mediaId = msg.message?.mediaUrl;
else mediaId = msg.key?.id;
const types = {