mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-25 18:08:40 -06:00
test: chatwoot
This commit is contained in:
parent
429d1ac183
commit
7767a2607e
@ -1505,30 +1505,6 @@ export class ChatwootService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (event === 'contacts.update') {
|
|
||||||
// this.logger.verbose('event contacts.update');
|
|
||||||
// const data = body;
|
|
||||||
|
|
||||||
// if (data.length) {
|
|
||||||
// this.logger.verbose('contacts found');
|
|
||||||
// for (const item of data) {
|
|
||||||
// const number = item.id.split('@')[0];
|
|
||||||
// const photo = item.profilePictureUrl || null;
|
|
||||||
// this.logger.verbose('find contact in chatwoot');
|
|
||||||
// const find = await this.findContact(instance, number);
|
|
||||||
|
|
||||||
// if (find) {
|
|
||||||
// this.logger.verbose('contact found');
|
|
||||||
|
|
||||||
// this.logger.verbose('update contact in chatwoot');
|
|
||||||
// await this.updateContact(instance, find.id, {
|
|
||||||
// avatar_url: photo,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (event === 'qrcode.updated') {
|
if (event === 'qrcode.updated') {
|
||||||
this.logger.verbose('event qrcode.updated');
|
this.logger.verbose('event qrcode.updated');
|
||||||
if (body.statusCode === 500) {
|
if (body.statusCode === 500) {
|
||||||
|
@ -953,14 +953,6 @@ export class WAStartupService {
|
|||||||
this.logger.verbose('Sending data to webhook in event CONTACTS_UPDATE');
|
this.logger.verbose('Sending data to webhook in event CONTACTS_UPDATE');
|
||||||
await this.sendDataWebhook(Events.CONTACTS_UPDATE, contactsRaw);
|
await this.sendDataWebhook(Events.CONTACTS_UPDATE, contactsRaw);
|
||||||
|
|
||||||
if (this.localChatwoot.enabled) {
|
|
||||||
await this.chatwootService.eventWhatsapp(
|
|
||||||
Events.CONTACTS_UPDATE,
|
|
||||||
{ instanceName: this.instance.name },
|
|
||||||
contactsRaw,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.logger.verbose('Updating contacts in database');
|
this.logger.verbose('Updating contacts in database');
|
||||||
await this.repository.contact.update(
|
await this.repository.contact.update(
|
||||||
contactsRaw,
|
contactsRaw,
|
||||||
|
Loading…
Reference in New Issue
Block a user