diff --git a/backend/src/services/WbotServices/wbotMessageListener.ts b/backend/src/services/WbotServices/wbotMessageListener.ts index a55e913..59db2e0 100644 --- a/backend/src/services/WbotServices/wbotMessageListener.ts +++ b/backend/src/services/WbotServices/wbotMessageListener.ts @@ -305,8 +305,8 @@ const wbotMessageListener = (whatsapp: Whatsapp): void => { await new Promise(r => setTimeout(r, 500)); try { - const messageToUpdate = await Message.findOne({ - where: { id: msg.id.id } + const messageToUpdate = await Message.findByPk(msg.id.id, { + include: ["contact", "vcardContact"] }); if (!messageToUpdate) { return; diff --git a/frontend/src/components/Ticket/index.js b/frontend/src/components/Ticket/index.js index a6eacfa..77396d6 100644 --- a/frontend/src/components/Ticket/index.js +++ b/frontend/src/components/Ticket/index.js @@ -455,13 +455,13 @@ const Ticket = () => { src={message.vcardContact?.profilePicUrl} /> } - title={message?.vcardContact?.name} - subheader={message?.vcardContact?.number} + title={message.vcardContact?.name} + subheader={message.vcardContact?.number} /> - + */} );