Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when sending contact messages #1994

Closed
1 task done
RC047 opened this issue Feb 12, 2023 · 1 comment · May be fixed by #1995
Closed
1 task done

Bug when sending contact messages #1994

RC047 opened this issue Feb 12, 2023 · 1 comment · May be fixed by #1995

Comments

@RC047
Copy link
Contributor

RC047 commented Feb 12, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When I send a message the contact from the wwebjs doesn't send as a contact, but just the vcard format as a normal text message.

Like this:
WhatsApp Image 2023-02-12 at 19 04 36

Expected behavior

Steps to Reproduce the Bug or Issue

Relevant Code

/* whatsapp-web.js
 * awesome-phonenumber
 */

let contact = await message.getContact()
let vcard = `
BEGIN:VCARD
VERSION:3.0
N:;${contact.pushname};;;
FN:${contact.pushname}
TEL;type=CELL;type=VOICE;waid=${contact.number}:${PhoneNumber('+' + contact.number).getNumber('international')}${contact.isBusiness ? `
X-WA-BIZ-NAME:${contact.pushname}
X-WA-BIZ-DESCRIPTION:${await contact.getAbout()}` : ''}
END:VCARD
`.trim()
   return chat.sendMessage(vcard, { quotedMessageId: message.id._serialized, parseVCards: true })

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

node.js 18.12.1
whatsapp-web.js 1.19.4

Additional context

No response

@RC047 RC047 added the bug Something isn't working label Feb 12, 2023
@PurpShell PurpShell removed the bug Something isn't working label Feb 13, 2023
@PurpShell PurpShell linked a pull request Feb 13, 2023 that will close this issue
6 tasks
@RC047
Copy link
Contributor Author

RC047 commented Feb 14, 2023

Fine thanks

@RC047 RC047 closed this as completed Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants