mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: change Baileys version, fixed problem to receive csat in chatwoot
This commit is contained in:
parent
0b07fb6a49
commit
7e996ad6fa
@ -44,7 +44,7 @@
|
||||
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
||||
"@figuro/chatwoot-sdk": "^1.1.14",
|
||||
"@hapi/boom": "^10.0.1",
|
||||
"@whiskeysockets/baileys": "github:DavidsonGomes/Baileys",
|
||||
"@whiskeysockets/baileys": "^6.4.0",
|
||||
"axios": "^1.3.5",
|
||||
"class-validator": "^0.13.2",
|
||||
"compression": "^1.7.4",
|
||||
|
@ -1096,7 +1096,12 @@ export class ChatwootService {
|
||||
}
|
||||
}
|
||||
|
||||
if (body.message_type === 'template' && body.content_type === 'input_csat') {
|
||||
if (
|
||||
body.message_type === 'template' &&
|
||||
body.content_type === 'input_csat' &&
|
||||
body.event === 'message_created'
|
||||
) {
|
||||
console.log(body);
|
||||
this.logger.verbose('check if is csat');
|
||||
|
||||
const data: SendTextDto = {
|
||||
|
@ -1305,6 +1305,7 @@ export class WAStartupService {
|
||||
const regexp = new RegExp(/^(\d{2})(\d{2})\d{1}(\d{8})$/);
|
||||
if (regexp.test(jid)) {
|
||||
const match = regexp.exec(jid);
|
||||
|
||||
if (match && (match[1] === '52' || match[1] === '54')) {
|
||||
const joker = Number.parseInt(match[3][0]);
|
||||
const ddd = Number.parseInt(match[2]);
|
||||
@ -1360,6 +1361,7 @@ export class WAStartupService {
|
||||
}
|
||||
|
||||
const formattedMXARNumber = this.formatMXOrARNumber(number);
|
||||
console.log(formattedMXARNumber, number);
|
||||
|
||||
if (formattedMXARNumber !== number) {
|
||||
this.logger.verbose(
|
||||
@ -1491,7 +1493,7 @@ export class WAStartupService {
|
||||
!message['poll'] &&
|
||||
!message['sticker'] &&
|
||||
!message['conversation'] &&
|
||||
!sender.includes('@broadcast')
|
||||
sender !== 'status@broadcast'
|
||||
) {
|
||||
if (!message['audio']) {
|
||||
this.logger.verbose('Sending message');
|
||||
@ -1521,7 +1523,7 @@ export class WAStartupService {
|
||||
);
|
||||
}
|
||||
|
||||
if (sender.includes('@broadcast')) {
|
||||
if (sender === 'status@broadcast') {
|
||||
this.logger.verbose('Sending message');
|
||||
return await this.client.sendMessage(
|
||||
sender,
|
||||
|
Loading…
Reference in New Issue
Block a user