Skip to content

Commit 384e311

Browse files
committed
fix: added delay in chatwoot receive webhook
1 parent 2791f88 commit 384e311

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/whatsapp/services/chatwoot.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,9 @@ export class ChatwootService {
460460
let contact: any;
461461
if (body.key.fromMe) {
462462
if (findContact) {
463-
contact = findContact;
463+
contact = await this.updateContact(instance, findContact.id, {
464+
avatar_url: picture_url.profilePictureUrl || null,
465+
});
464466
} else {
465467
const jid = isGroup ? null : body.key.remoteJid;
466468
contact = await this.createContact(
@@ -481,7 +483,9 @@ export class ChatwootService {
481483
avatar_url: picture_url.profilePictureUrl || null,
482484
});
483485
} else {
484-
contact = findContact;
486+
contact = await this.updateContact(instance, findContact.id, {
487+
avatar_url: picture_url.profilePictureUrl || null,
488+
});
485489
}
486490
} else {
487491
const jid = isGroup ? null : body.key.remoteJid;

0 commit comments

Comments
 (0)