Skip to content

fix(whatsapp): resolve issues in template-sending paths and media headers#404

Open
DibashSarkar wants to merge 2 commits into
ArnasDon:mainfrom
DibashSarkar:fix/send-path-fixes
Open

fix(whatsapp): resolve issues in template-sending paths and media headers#404
DibashSarkar wants to merge 2 commits into
ArnasDon:mainfrom
DibashSarkar:fix/send-path-fixes

Conversation

@DibashSarkar

Copy link
Copy Markdown

Description

This PR addresses several critical bugs in the WhatsApp message sending paths, specifically around how templates with media headers are processed and dispatched to the Meta API.

Note: This is part 3 of splitting up the previous monolithic PR to allow for easier, safer reviews.

Changes

  • Fixed serialization and attachment issues when sending templates containing rich media headers (images/documents).
  • Improved error handling and validation in the outgoing message payload construction paths.
  • Ensured that wamid mapping and message status callbacks correctly associate with the dispatched template.

Why this is needed

To ensure reliability in outbound messaging. Prior to these fixes, certain templates with media components would fail to send or be malformed, resulting in API rejections from Meta.

Testing

  • Verified sending standard text templates.
  • Verified sending templates with media headers (images/documents) successfully deliver to the WhatsApp client.
  • Automated tests (npm run test) pass without regressions.

@DibashSarkar
DibashSarkar requested a review from ArnasDon as a code owner July 17, 2026 20:52
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 this pull request may close these issues.

1 participant