feat: handle vcard messages

This commit is contained in:
canove
2020-10-04 14:31:01 -03:00
parent 315dbac175
commit cbd62a436e
2 changed files with 6 additions and 6 deletions

View File

@@ -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;

View File

@@ -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}
/>
<CardActions>
<Button size="small" variant="contained">
{/* <Button size="small" variant="contained">
Send Message
</Button>
</Button> */}
</CardActions>
</Card>
);