* 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> |
||
|---|---|---|
| .. | ||
| linear | ||
| shopify | ||
| baileys_helper_spec.rb | ||
| billing_helper_spec.rb | ||
| cache_keys_helper_spec.rb | ||
| contact_helper_spec.rb | ||
| email_helper_spec.rb | ||
| frontend_urls_helper_spec.rb | ||
| message_format_helper_spec.rb | ||
| portal_helper_spec.rb | ||
| reporting_event_helper_spec.rb | ||
| url_helper_spec.rb | ||