From 945bcf5fad4a2be693fb614c27d2daa19a7961d6 Mon Sep 17 00:00:00 2001 From: jaison-x Date: Mon, 5 Feb 2024 13:13:23 -0300 Subject: [PATCH] feat(chatwoot): command to clearcache from chatwoot inbox --- src/whatsapp/services/chatwoot.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/whatsapp/services/chatwoot.service.ts b/src/whatsapp/services/chatwoot.service.ts index b0b07ce59..2052cb6a5 100644 --- a/src/whatsapp/services/chatwoot.service.ts +++ b/src/whatsapp/services/chatwoot.service.ts @@ -1195,6 +1195,12 @@ export class ChatwootService { } } + if (command === 'clearcache') { + this.logger.verbose('command clearcache found'); + waInstance.clearCacheChatwoot(); + await this.createBotMessage(instance, `✅ ${body.inbox.name} instance cache cleared.`, 'incoming'); + } + if (command === 'status') { this.logger.verbose('command status found');