fix(WhatsappDirectLine): update sendFileToDevice to default isViewOnce to true and clean up header example

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-06-15 19:23:39 -03:00
parent 127425a0f9
commit d5e7ef1e04

View file

@ -654,6 +654,7 @@ export class GBConversationalService {
let loader = new DocxLoader(localName);
let doc = await loader.load();
text = doc[0].pageContent;
template = template + '_docx';
}
let mediaFile = !isMedia ? /(.*)\n/gim.exec(text)[0].trim() : text;
let mediaType = mediaFile.toLowerCase().endsWith('.mp4') || text.toLowerCase().endsWith('.mov') ? 'video' : 'image';