diff --git a/backend/src/controllers/WhatsAppController.ts b/backend/src/controllers/WhatsAppController.ts index 014fc20..e8e0499 100644 --- a/backend/src/controllers/WhatsAppController.ts +++ b/backend/src/controllers/WhatsAppController.ts @@ -230,9 +230,9 @@ export const weebhook = async ( req.body.entry[0].changes[0].value.metadata.display_phone_number; let type = message.type; - const contact_from_exist = await get("whatsapp:*", `${contact_from}`); + const contact_to_exist = await get("whatsapp:*", `${contact_to}`); - if (!contact_from_exist) { + if (contact_to_exist == null) { console.log( "WHATSAPP OFFICIAL", " | CONCTACT_FROM: ",