fix: fixed issue where CSAT opened a new ticket when reopen_conversation was disabled

This commit is contained in:
Davidson Gomes 2023-12-12 16:08:09 -03:00
parent c296bf4178
commit f246516a6e
3 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,7 @@
* Added restart instance when update profile picture * Added restart instance when update profile picture
* Correction of chatwoot functioning with admin flows * Correction of chatwoot functioning with admin flows
* Fixed problem that did not generate qrcode with the chatwoot_conversation_pending option enabled * Fixed problem that did not generate qrcode with the chatwoot_conversation_pending option enabled
* Fixed issue where CSAT opened a new ticket when reopen_conversation was disabled
### Integrations ### Integrations

View File

@ -1458,6 +1458,11 @@ export class ChatwootService {
this.logger.verbose('get conversation message'); this.logger.verbose('get conversation message');
const bodyMessage = await this.getConversationMessage(body.message); const bodyMessage = await this.getConversationMessage(body.message);
if (bodyMessage.includes('Por favor, classifique esta conversa, http')) {
this.logger.verbose('conversation is closed');
return;
}
const isMedia = this.isMediaMessage(body.message); const isMedia = this.isMediaMessage(body.message);
const adsMessage = this.getAdsMessage(body.message); const adsMessage = this.getAdsMessage(body.message);

View File

@ -1777,7 +1777,7 @@ export class WAStartupService {
this.logger.verbose('Sending data to webhook in event MESSAGES_UPSERT'); this.logger.verbose('Sending data to webhook in event MESSAGES_UPSERT');
this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw); this.sendDataWebhook(Events.MESSAGES_UPSERT, messageRaw);
if (this.localChatwoot.enabled) { if (this.localChatwoot.enabled && !received.key.id.includes('@broadcast')) {
const chatwootSentMessage = await this.chatwootService.eventWhatsapp( const chatwootSentMessage = await this.chatwootService.eventWhatsapp(
Events.MESSAGES_UPSERT, Events.MESSAGES_UPSERT,
{ instanceName: this.instance.name }, { instanceName: this.instance.name },