feat(baileys): populate body with vCard for inbound contact shares - #1436
Merged
rmyndharis merged 1 commit intoAug 23, 2026
Merged
Conversation
rmyndharis
force-pushed
the
feat/baileys-inbound-contact-vcard-body
branch
from
August 23, 2026 11:32
c085c72 to
a0e861d
Compare
Baileys silently dropped the text of a shared contact card: neither contactMessage nor contactsArrayMessage was read by extractBaileysBody, so the neutral body field stayed empty even though whatsapp-web.js already returns the raw vCard for its vcard type. Several contacts shared together are newline-joined into one multi-vCard body, in the order they were shared (RFC 6350 allows concatenated vCards in one stream); whatsapp-web.js leaves multi_vcard bodies empty, so that case is a Baileys extension rather than parity.
rmyndharis
force-pushed
the
feat/baileys-inbound-contact-vcard-body
branch
from
August 23, 2026 11:35
a0e861d to
fe24d1c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Baileys silently dropped the text of a shared contact card: neither contactMessage nor contactsArrayMessage was read by extractBaileysBody, so the neutral body field stayed empty even though whatsapp-web.js already returns the raw vCard for its
vcardtype. Several contacts shared together are newline-joined into one multi-vCard body, in the order they were shared (RFC 6350 allows concatenated vCards in one stream).contactMessagecontributes its vCard as-is, matching thebodywhatsapp-web.js produces forvcard.contactsArrayMessage(several contacts shared together) has its vCards newline-joined, in the order they were shared - a valid single multi-vCard body per RFC 6350. whatsapp-web.js leaves amulti_vcardbody empty, so this case is a Baileys extension rather than parity.''when neither is present, same as every other body source inthis function.
Message type classification (
contactMessage/contactsArrayMessage→contact)already existed in
message-mapper.ts; this fixes thebodytext that goes with it.Type of Change
Checklist
[Unreleased])Screenshots (if applicable)
N/A - mapper-level change, no UI impact.
Related Issues