From d35d75537926bcd549d96a323f0bd2d35209d727 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 9a5fc966..9998c6a7 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');