iachat/spec/services/whatsapp/providers
Gabriel Jablonski 8cf6e8907f
release v4.12.0-fazer-ai.47 (#259)
* fix(whatsapp): add idempotent message sending to prevent duplicates on timeout retry

When sending media messages via Baileys, Net::ReadTimeout causes Sidekiq to
retry the job, potentially sending the same message multiple times. This adds
a chatwootMessageId parameter to the Baileys API request, enabling server-side
deduplication via Redis. Also increases HTTP timeout to 120s and channel lock
to 130s to reduce false timeouts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback

- Use error.class.name assertions for parallel/reloading safety
- Assert reconnect endpoint was not called on 409 (stronger assertion)

* fix: address review feedback (round 2)

- Only release channel lock in ensure if it was actually acquired (prevents
  clearing another worker's lock on timeout)
- Assert chatwootMessageId in reproduction spec body matcher

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 20:52:26 -03:00
..
whatsapp360_dialog_service_spec.rb feat: Add i18n on whatsapp list button (#10852) 2025-06-11 22:19:36 -04:00
whatsapp_baileys_service_spec.rb release v4.12.0-fazer-ai.47 (#259) 2026-04-08 20:52:26 -03:00
whatsapp_cloud_service_spec.rb fix: normalize audio/opus content type to audio/ogg for WhatsApp attachments (#223) 2026-02-24 22:01:18 -03:00
whatsapp_zapi_service_spec.rb test: fix ci (#203) 2026-01-30 22:31:48 -03:00