fix(vcard): parse vcard module (#1995)

* fix(vcard): parse vcard module

* fix(vcard): eslint

* refactor: merge internal modules into VCardUtils

* fix: use proper modules for parsing vcards

* feat: add usage example

* chore: eslint fix

* fix: send vcard with email

Co-authored-by: KH Soh <2169449+khsoh@users.noreply.github.com>

* feat: add additional context to usage example

* refactor: revert module rename

---------

Co-authored-by: Codeboss <131376628+codebossdev@users.noreply.github.com>
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
Co-authored-by: KH Soh <2169449+khsoh@users.noreply.github.com>
This commit is contained in:
CyrilLacroix 2025-06-02 21:08:45 +02:00 • committed by GitHub
commit c142c3bf93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View file

@ -135,11 +135,12 @@ exports.LoadUtils = () => {
vcardOptions = {
type: 'multi_vcard',
vcardList: vcards,
body: undefined
body: null
};
delete options.contactCardList;
} else if (options.parseVCards && typeof (content) === 'string' && content.startsWith('BEGIN:VCARD')) {
delete options.parseVCards;
delete options.linkPreview;
try {
const parsed = window.Store.VCard.parseVcard(content);
if (parsed) {