Skip to content

Commit fabd717

Browse files
Merge pull request #408 from jaison-x/pr
fix(chatwoot): fix qrcode filename
2 parents b0e956c + d35d755 commit fabd717

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/whatsapp/services/chatwoot.service.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,12 @@ export class ChatwootService {
11951195
}
11961196
}
11971197

1198+
if (command === 'clearcache') {
1199+
this.logger.verbose('command clearcache found');
1200+
waInstance.clearCacheChatwoot();
1201+
await this.createBotMessage(instance, `✅ ${body.inbox.name} instance cache cleared.`, 'incoming');
1202+
}
1203+
11981204
if (command === 'status') {
11991205
this.logger.verbose('command status found');
12001206

@@ -2102,7 +2108,7 @@ export class ChatwootService {
21022108
this.logger.verbose('qrcode success');
21032109
const fileData = Buffer.from(body?.qrcode.base64.replace('data:image/png;base64,', ''), 'base64');
21042110

2105-
const fileName = `${path.join(waInstance?.storePath, 'temp', `${`${instance}.png`}`)}`;
2111+
const fileName = `${path.join(waInstance?.storePath, 'temp', `${instance.instanceName}.png`)}`;
21062112

21072113
this.logger.verbose('temp file name: ' + fileName);
21082114

0 commit comments

Comments
 (0)