test: chatwoot

This commit is contained in:
Davidson Gomes 2023-07-19 08:18:07 -03:00
parent 429d1ac183
commit 7767a2607e
2 changed files with 0 additions and 32 deletions

View File

@ -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') {
this.logger.verbose('event qrcode.updated');
if (body.statusCode === 500) {

View File

@ -953,14 +953,6 @@ export class WAStartupService {
this.logger.verbose('Sending data to webhook in event CONTACTS_UPDATE');
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');
await this.repository.contact.update(
contactsRaw,