diff --git a/src/whatsapp/services/chatwoot.service.ts b/src/whatsapp/services/chatwoot.service.ts index b0b07ce59..9998c6a77 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'); @@ -2102,7 +2108,7 @@ export class ChatwootService { this.logger.verbose('qrcode success'); const fileData = Buffer.from(body?.qrcode.base64.replace('data:image/png;base64,', ''), 'base64'); - const fileName = `${path.join(waInstance?.storePath, 'temp', `${`${instance}.png`}`)}`; + const fileName = `${path.join(waInstance?.storePath, 'temp', `${instance.instanceName}.png`)}`; this.logger.verbose('temp file name: ' + fileName);