fix: Fixed issue sending contact to Chatwoot via iOS

This commit is contained in:
Davidson Gomes 2023-12-12 16:28:01 -03:00
parent f246516a6e
commit ade3952016
3 changed files with 18 additions and 6 deletions

View File

@ -27,6 +27,7 @@
* Correction of chatwoot functioning with admin flows
* 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
* Fixed issue sending contact to Chatwoot via iOS
### Integrations

View File

@ -1373,6 +1373,11 @@ export class ChatwootService {
formattedContact += `\n**number ${numberCount}:** ${phoneNumber}`;
numberCount++;
}
if (key.includes('TEL')) {
const phoneNumber = contactInfo[key];
formattedContact += `\n**number:** ${phoneNumber}`;
numberCount++;
}
});
this.logger.verbose('message content: ' + formattedContact);
@ -1401,6 +1406,11 @@ export class ChatwootService {
formattedContact += `\n**number ${numberCount}:** ${phoneNumber}`;
numberCount++;
}
if (key.includes('TEL')) {
const phoneNumber = contactInfo[key];
formattedContact += `\n**number:** ${phoneNumber}`;
numberCount++;
}
});
return formattedContact;
@ -1458,7 +1468,7 @@ export class ChatwootService {
this.logger.verbose('get conversation message');
const bodyMessage = await this.getConversationMessage(body.message);
if (bodyMessage.includes('Por favor, classifique esta conversa, http')) {
if (bodyMessage && bodyMessage.includes('Por favor, classifique esta conversa, http')) {
this.logger.verbose('conversation is closed');
return;
}

View File

@ -1795,11 +1795,12 @@ export class WAStartupService {
if ((this.localTypebot.enabled && type === 'notify') || typebotSessionRemoteJid) {
if (!(this.localTypebot.listening_from_me === false && messageRaw.key.fromMe === true)) {
await this.typebotService.sendTypebot(
{ instanceName: this.instance.name },
messageRaw.key.remoteJid,
messageRaw,
);
if (messageRaw.messageType !== 'reactionMessage')
await this.typebotService.sendTypebot(
{ instanceName: this.instance.name },
messageRaw.key.remoteJid,
messageRaw,
);
}
}