fix: added delay in chatwoot receive webhook

This commit is contained in:
Davidson Gomes 2023-09-04 16:48:04 -03:00
parent 2791f88b4c
commit 384e311c7a

View File

@ -460,7 +460,9 @@ export class ChatwootService {
let contact: any;
if (body.key.fromMe) {
if (findContact) {
contact = findContact;
contact = await this.updateContact(instance, findContact.id, {
avatar_url: picture_url.profilePictureUrl || null,
});
} else {
const jid = isGroup ? null : body.key.remoteJid;
contact = await this.createContact(
@ -481,7 +483,9 @@ export class ChatwootService {
avatar_url: picture_url.profilePictureUrl || null,
});
} else {
contact = findContact;
contact = await this.updateContact(instance, findContact.id, {
avatar_url: picture_url.profilePictureUrl || null,
});
}
} else {
const jid = isGroup ? null : body.key.remoteJid;