Merge pull request #408 from jaison-x/pr

fix(chatwoot): fix qrcode filename
This commit is contained in:
Davidson Gomes 2024-02-08 14:46:56 -03:00 committed by GitHub
commit fabd717d92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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') { if (command === 'status') {
this.logger.verbose('command status found'); this.logger.verbose('command status found');
@ -2102,7 +2108,7 @@ export class ChatwootService {
this.logger.verbose('qrcode success'); this.logger.verbose('qrcode success');
const fileData = Buffer.from(body?.qrcode.base64.replace('data:image/png;base64,', ''), 'base64'); 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); this.logger.verbose('temp file name: ' + fileName);