diff --git a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts index 75ca6859..e09526cb 100644 --- a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts +++ b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts @@ -834,9 +834,11 @@ export class WhatsappDirectLine extends GBService { // Function to create or update a template using WhatsApp Business API public async createOrUpdateTemplate(min: GBMinInstance, template, text) { + template = template.replace('.docx', ''); template = template.replace(/\-/gi, '_'); template = template.replace(/\./gi, '_'); + // Determine if media is image or video let isMedia = text.toLowerCase().endsWith('.jpg') ||