mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-21 13:19:21 +00:00
fix bugs vcard
[ PT-BR ] - Corrigido bug quando enviado vcard sem numero de telefone. [ US ] - Corrected bug when sent vcard without phone number.
This commit is contained in:
@@ -446,7 +446,7 @@ const MessagesList = ({ ticketId, isGroup }) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
return <VcardPreview contact={contact} numbers={obj[0].number} />
|
||||
return <VcardPreview contact={contact} numbers={obj[0]?.number} />
|
||||
}
|
||||
/*else if (message.mediaType === "multi_vcard") {
|
||||
console.log("multi_vcard")
|
||||
|
||||
@@ -27,7 +27,8 @@ const VcardPreview = ({ contact, numbers }) => {
|
||||
try {
|
||||
let contactObj = {
|
||||
name: contact,
|
||||
number: numbers.replace(/\D/g, ""),
|
||||
// number: numbers.replace(/\D/g, ""),
|
||||
number: numbers !== undefined && numbers.replace(/\D/g, ""),
|
||||
email: ""
|
||||
}
|
||||
const { data } = await api.post("/contact", contactObj);
|
||||
|
||||
Reference in New Issue
Block a user