mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-04 21:02:35 +08:00
Chatwoot now lets external apps know when an inbox loses its connection and needs re-authentication. When a channel's authorization expires (for example, an email inbox disconnects), Chatwoot fires an `inbox_updated` webhook reflecting the new `reauthorization_required` status, and fires it again once the inbox is re-authenticated. Integrators can keep their own view of which inboxes are healthy without polling the API. This is gated behind the `ENABLE_INBOX_EVENTS` installation flag — the **Inbox updated** webhook subscription only appears in the dashboard when that flag is enabled, so no event is offered that the backend wouldn't dispatch. Fixes https://linear.app/chatwoot/issue/CW-7148/emit-inbox-webhook-when-an-inbox-is-disconnected ## How to test 1. Set `ENABLE_INBOX_EVENTS=true` and restart the app. 2. In **Settings → Integrations → Webhooks**, add a webhook and subscribe to **Inbox updated**. 3. Disconnect an inbox — let an email/Instagram channel hit its auth-error threshold, or run `inbox.channel.prompt_reauthorization!` in a console. 4. The endpoint receives an `inbox_updated` event whose `changed_attributes` shows `reauthorization_required` flipping to `true`. 5. Re-authenticate the inbox (or run `inbox.channel.reauthorized!`) — the endpoint receives the `true → false` transition. 6. Confirm the **Inbox updated** option is hidden when `ENABLE_INBOX_EVENTS` is unset. --------- Co-authored-by: Muhsin <12408980+muhsin-k@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| .keep | ||
| access_tokenable.rb | ||
| account_cache_revalidator.rb | ||
| account_captain_auto_resolve.rb | ||
| account_email_rate_limitable.rb | ||
| account_settings_schema.rb | ||
| activity_message_handler.rb | ||
| assignee_activity_message_handler.rb | ||
| assignment_handler.rb | ||
| auto_assignment_handler.rb | ||
| availability_statusable.rb | ||
| avatarable.rb | ||
| cache_keys.rb | ||
| captain_featurable.rb | ||
| channelable.rb | ||
| content_attribute_validator.rb | ||
| conversation_mute_helpers.rb | ||
| email_address_parseable.rb | ||
| featurable.rb | ||
| inbox_agent_availability.rb | ||
| json_schema_validator.rb | ||
| label_activity_message_handler.rb | ||
| labelable.rb | ||
| liquidable.rb | ||
| llm_formattable.rb | ||
| message_filter_helpers.rb | ||
| out_of_offisable.rb | ||
| priority_activity_message_handler.rb | ||
| pubsubable.rb | ||
| push_data_helper.rb | ||
| reauthorizable.rb | ||
| reportable.rb | ||
| sla_activity_message_handler.rb | ||
| sort_handler.rb | ||
| sso_authenticatable.rb | ||
| team_activity_message_handler.rb | ||
| user_attribute_helpers.rb | ||
| webhook_secretable.rb | ||