iachat/app
Tanmay Deep Sharma d84ef4cfd6
fix(whatsapp): skip health check during reauthorization flow (#13911)
After a successful WhatsApp OAuth reauthorization, the health check runs
immediately and finds the phone number in a pending provisioning state
(`platform_type: NOT_APPLICABLE`). This incorrectly triggers
`prompt_reauthorization!`, re-setting the Redis disconnect flag and
sending a disconnect email — even though the reauth just succeeded.

The fix skips the health check during reauthorization flows. It still
runs for new channel creation.

Closes https://github.com/chatwoot/chatwoot/pull/12556

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How to reproduce

1. Have a WhatsApp channel with a phone number in pending provisioning
state (display name not yet approved by Meta)
2. Complete the OAuth reauthorization flow
3. Observe that the user receives a "success" response but immediately
gets a disconnect email

## What changed

- `Whatsapp::EmbeddedSignupService#perform` now skips
`check_channel_health_and_prompt_reauth` when `inbox_id` is present
(reauthorization flow)


🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-03-26 15:00:09 +05:30
..
actions fix: Skip redundant contact saves in ContactIdentifyAction (#13778) 2026-03-11 21:40:38 -07:00
assets feat: Hide installation identifier (#11722) 2025-06-17 15:45:40 -07:00
builders fix: Handle Facebook reel attachment type (#13691) 2026-03-06 08:49:41 +04:00
channels fix: Move contact events to account stream rather than individual user stream (#11082) 2025-03-13 17:46:48 -07:00
controllers chore: mark conversation notifications as read on visit (#13906) 2026-03-26 14:01:26 +05:30
dashboards fix(super-admin): prefill confirmed_at in new user form (#13662) 2026-03-10 12:14:58 +05:30
dispatchers feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
drops feat: Add the support for custom attributes in message variables (#8511) 2023-12-08 14:13:35 -08:00
fields fix(super-admin): prefill confirmed_at in new user form (#13662) 2026-03-10 12:14:58 +05:30
finders feat: Add a priority + created at sort for conversations (#13658) 2026-02-25 18:22:41 -08:00
helpers feat(rollup): add models and write path [1/3] (#13796) 2026-03-19 13:12:36 +05:30
javascript chore(v5): update priority icons (#13905) 2026-03-26 09:20:36 +05:30
jobs fix(agent-bot): Include payload in webhook retry failure logs (#13879) 2026-03-24 10:52:37 +04:00
listeners feat(rollup): add models and write path [1/3] (#13796) 2026-03-19 13:12:36 +05:30
mailboxes refactor: strategy pattern for mailbox conversation finding (#12766) 2025-11-10 20:47:18 +05:30
mailers fix(email): Allow inbox OAuth replies without global SMTP (#13820) 2026-03-17 11:10:42 +04:00
models fix: Annotaterb model annotation incomplete migration (#13132) 2026-03-25 17:51:06 -07:00
policies feat(help-center): enable drag-and-drop category reordering (#13706) 2026-03-05 12:53:38 +05:30
presenters fix: Send raw content in webhook payloads instead of channel-rendered markdown (#13896) 2026-03-25 16:56:22 +04:00
services fix(whatsapp): skip health check during reauthorization flow (#13911) 2026-03-26 15:00:09 +05:30
views fix: return correct outgoing_url in Platform agent bot API responses (#13827) 2026-03-17 13:40:45 -07:00