mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
fix: Bug fix when connecting whatsapp does not send confirmation message
This commit is contained in:
@@ -1457,7 +1457,8 @@ export class ChatwootService {
|
||||
|
||||
if (event === 'connection.update') {
|
||||
this.logger.verbose('event connection.update');
|
||||
if (body.state === 'open') {
|
||||
console.log('connection.update', body);
|
||||
if (body.status === 'open') {
|
||||
const msgConnection = `🚀 Conexão realizada com sucesso!`;
|
||||
|
||||
this.logger.verbose('send message to chatwoot');
|
||||
|
||||
@@ -624,6 +624,17 @@ export class WAStartupService {
|
||||
│ CONNECTED TO WHATSAPP │
|
||||
└──────────────────────────────┘`.replace(/^ +/gm, ' '),
|
||||
);
|
||||
|
||||
if (this.localChatwoot.enabled) {
|
||||
this.chatwootService.eventWhatsapp(
|
||||
Events.CONNECTION_UPDATE,
|
||||
{ instanceName: this.instance.name },
|
||||
{
|
||||
instance: this.instance.name,
|
||||
status: 'open',
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user