diff --git a/src/core/engines/webjs/session.webjs.core.ts b/src/core/engines/webjs/session.webjs.core.ts index 6af62afe..a0abe069 100644 --- a/src/core/engines/webjs/session.webjs.core.ts +++ b/src/core/engines/webjs/session.webjs.core.ts @@ -12,6 +12,7 @@ import { } from 'whatsapp-web.js'; import { Message as MessageInstance } from 'whatsapp-web.js/src/structures'; +import { parseBool } from '../../../helpers'; import { ChatRequest, CheckNumberStatusQuery, @@ -421,6 +422,7 @@ export class WhatsappSessionWebJSCore extends WhatsappSession { } async getChatMessages(chatId: string, limit: number, downloadMedia: boolean) { + downloadMedia = parseBool(downloadMedia) const chat: Chat = await this.whatsapp.getChatById( this.ensureSuffix(chatId), );