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

fix(vcard): parse vcard module #1995

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

CyrilLacroix
Copy link

@CyrilLacroix CyrilLacroix commented Feb 12, 2023

PR Details

Fix for vCard parsing.

Description

The module vcardFromContactModel doesn't contain parseVcard and vcardGetNameFromParsed functions anymore.
They can be found in the module WA_BIZ_NAME.

closes #1994 closes #2680

Motivation and Context

The vCard was not display, the content of the vCard was sent to Whatsapp chat.

How Has This Been Tested

Tested with a Bot, the vCard is now generated and displayed properly in Whatsapp.

Types of changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (index.d.ts).

@tuyuribr tuyuribr added the waiting for testers Waiting for other people test this PR in other envs label Feb 12, 2023
@tofers
Copy link
Contributor

tofers commented Feb 12, 2023

#1994

@PurpShell
Copy link
Sponsor Collaborator

closes #1994

@PurpShell PurpShell linked an issue Feb 13, 2023 that may be closed by this pull request
1 task
@RC047
Copy link
Contributor

RC047 commented Feb 14, 2023

thanks

@tofers tofers mentioned this pull request Feb 19, 2023
1 task
@nathanfinger
Copy link

Should this be working with multiple cards?

Copy link
Collaborator

@tuyuribr tuyuribr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make ESList god happy

Copy link

@themazim themazim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, works on ios, android and web.

@PurpShell
Copy link
Sponsor Collaborator

Remove all formatting changes

@frnndwrms
Copy link

@CyrilLacroix

Installing npm install git+https://github.com/CyrilLacroix/whatsapp-web.js.git

get a

TypeError: data.id.id.substring is not a function

When is it going to be merge to master?

@shirser121
Copy link
Collaborator

Where we standing with this?

@RC047
Copy link
Contributor

RC047 commented Aug 12, 2023

When this pull merge it? It works flawlessly @PurpShell @tuyuribr @shirser121

Copy link
Contributor

@RC047 RC047 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested its work

@RC047
Copy link
Contributor

RC047 commented Dec 12, 2023

@alechkos

@RC047 RC047 mentioned this pull request Dec 12, 2023
1 task
@joweste
Copy link

joweste commented Dec 22, 2023

I tested its work

Didn´t work to me

@alechkos alechkos added the waiting for a response Waiting for a response from the author of an issue or a PR label Jan 14, 2024
@khsoh
Copy link

khsoh commented Jan 17, 2024

I tested the change and confirm that it fixes the problem.

@alechkos alechkos removed the waiting for a response Waiting for a response from the author of an issue or a PR label Jan 17, 2024
@alechkos alechkos requested review from shirser121 and tuyuribr and removed request for tuyuribr January 17, 2024 03:29
@aksiuwaa
Copy link

vcardGetNameFromParsed is no longer usable, I have switched to parsed.N[0].value.join(' ').trim()

@RemyBoy72
Copy link

vcardGetNameFromParsed is no longer usable, I have switched to parsed.N[0].value.join(' ').trim()

Can you share all the code changes need to be placed?

1 similar comment
@videjunior
Copy link

vcardGetNameFromParsed is no longer usable, I have switched to parsed.N[0].value.join(' ').trim()

Can you share all the code changes need to be placed?

@aksiuwaa
Copy link

src/util/Injected.js in line 270:
const parsed = window.Store.VCardParse.parseVcard(content);
if (parsed) {
vcardOptions = {
type: 'vcard',
vcardFormattedName: parsed.N[0].value.join(' ').trim()
};
}

@RemyBoy72
Copy link

src/util/Injected.js in line 270: const parsed = window.Store.VCardParse.parseVcard(content); if (parsed) { vcardOptions = { type: 'vcard', vcardFormattedName: parsed.N[0].value.join(' ').trim() }; }

thx but it still doesnt work at least for me. any other way to rectify the issue?

@raisa875647
Copy link

how do I solve this, please explain what needs to be replaced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for testers Waiting for other people test this PR in other envs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to send Contact Bug when sending contact messages