iachat/spec/services/whatsapp
Muhsin Keloth 990201f697 fix: Remove phone_number_id param from WhatsApp media retrieval for incoming messages (#13319)
Fixes https://github.com/chatwoot/chatwoot/issues/13317
Fixes an issue where WhatsApp attachment messages (images, audio, video,
documents) were failing to download. Messages were being created but
without attachments.

The `phone_number_id` parameter was being passed to the `GET
/<MEDIA_ID>` endpoint when downloading incoming media. According to
Meta's documentation:

> "Note that `phone_number_id` is optional. If included, the request
will only be processed if the business phone number ID included in the
query matches the ID of the business
  phone number **that the media was uploaded on**."

For incoming messages, media is uploaded by the customer, not by the
business phone number. Passing the business's `phone_number_id` causes
validation to fail with error: `Param phone_number_id is not a valid
whatsapp business phone number id ID`

This PR removes the `phone_number_id` parameter from the media URL
request for incoming messages.
2026-01-20 13:38:46 -03:00
..
baileys_handlers fix: enhance filename extraction for document messages with captions (#159) 2025-11-30 19:14:58 -03:00
providers test: comment out test for audio attachment due to transcoding requirement 2026-01-19 16:01:31 -03:00
zapi_handlers fix: whatsapp race condition (#185) 2026-01-15 22:16:32 -03:00
channel_creation_service_spec.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
csat_template_service_spec.rb feat: Add backend changes for whatsapp csat template (#12984) 2025-12-11 16:36:37 +05:30
embedded_signup_service_spec.rb feat: Add WhatsApp health monitoring and self-service registration completion (#12556) 2025-10-02 11:25:48 +05:30
facebook_api_client_spec.rb feat: Remove subscription on WhatsApp inbox delete (#11977) 2025-07-24 14:04:19 +04:00
incoming_message_baileys_service_spec.rb fix: whatsapp race condition (#190) 2026-01-17 00:08:51 -03:00
incoming_message_service_spec.rb fix: whatsapp race condition (#190) 2026-01-17 00:08:51 -03:00
incoming_message_whatsapp_cloud_service_spec.rb fix: Remove phone_number_id param from WhatsApp media retrieval for incoming messages (#13319) 2026-01-20 13:38:46 -03:00
incoming_message_zapi_service_spec.rb feat(zapi): handle contact messages and ignore notifications (#124) 2025-10-26 10:48:06 -03:00
oneoff_campaign_service_spec.rb Merge branch 'main' into chore/merge-upstream-4.5.0 2025-08-20 11:20:31 -03:00
phone_info_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
populate_template_parameters_service_spec.rb fix: Normalize URLs with spaces in WhatsApp template parameters (#12594) 2025-10-08 15:33:06 +05:30
send_on_whatsapp_service_spec.rb feat(baileys): upgrade to v7 (#143) 2025-11-13 20:42:08 -03:00
template_parameter_converter_service_spec.rb fix: Handle nil processed_params for WhatsApp templates without params (#12177) 2025-08-12 22:56:53 +05:30
token_exchange_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
token_validation_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
webhook_setup_service_spec.rb feat: Add WhatsApp health monitoring and self-service registration completion (#12556) 2025-10-02 11:25:48 +05:30
webhook_teardown_service_spec.rb feat: add reauth flow for wa embedded signup (#11940) 2025-08-08 01:48:45 +05:30