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)); await new Promise(r => setTimeout(r, 500));
try { try {
const messageToUpdate = await Message.findOne({ const messageToUpdate = await Message.findByPk(msg.id.id, {
where: { id: msg.id.id } include: ["contact", "vcardContact"]
}); });
if (!messageToUpdate) { if (!messageToUpdate) {
return; return;

View File

@@ -455,13 +455,13 @@ const Ticket = () => {
src={message.vcardContact?.profilePicUrl} src={message.vcardContact?.profilePicUrl}
/> />
} }
title={message?.vcardContact?.name} title={message.vcardContact?.name}
subheader={message?.vcardContact?.number} subheader={message.vcardContact?.number}
/> />
<CardActions> <CardActions>
<Button size="small" variant="contained"> {/* <Button size="small" variant="contained">
Send Message Send Message
</Button> </Button> */}
</CardActions> </CardActions>
</Card> </Card>
); );