FEAT: Expõe mediaUrl no histórico de mensagens e injeta MediaStorageService

This commit is contained in:
Rafael Alves Lopes 2026-07-21 16:37:06 -03:00
parent 3f1535b960
commit ad835b5b1d

View File

@ -87,8 +87,10 @@ export class WhatsappService {
body: row.body ?? '',
fromMe: Boolean(row.from_me),
timestamp: Number(row.timestamp),
hasMedia: row.type !== 'text',
hasMedia: Boolean(row.media_path || row.type !== 'text'),
media: null,
mediaUrl: row.media_path ? this.mediaStorageService.getUrl(row.media_path) : null,
mediaMimeType: row.media_mime_type ?? null,
chatId: row.chat_id,
status: row.status,
}));