iachat/app
Muhsin Keloth f4d66566d0
fix(agent-bot): Include changed_attributes in conversation_updated webhook (#14001)
The `conversation_updated` webhook sent to AgentBots did not include
`changed_attributes`, making it impossible for bots to distinguish
between different types of conversation updates (e.g. bot assignment vs
label change vs status change).

This aligns the AgentBot webhook payload with the existing
`WebhookListener` behavior, which already includes `changed_attributes`.

## How to reproduce

1. Assign an AgentBot to a conversation
2. Then update the conversation (e.g. add a label)
3. **Before fix:** Both events arrive with identical payload structure —
bot cannot tell them apart
4. **After fix:** Each event includes `changed_attributes` showing
exactly what changed

## What changed

- **`AgentBotListener#conversation_updated`**: Added
`changed_attributes` to the webhook payload using
`extract_changed_attributes` (same pattern as `WebhookListener`)

## How to test

1. Assign an AgentBot to a conversation via API
2. Check the webhook payload — should include:
   ```json
   "changed_attributes": [
{ "assignee_agent_bot_id": { "previous_value": null, "current_value": 7
} }
   ]
   ```
3. Update the conversation (e.g. add a label)
4. Check the webhook payload — `changed_attributes` should reflect the
label change, not bot assignment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Muhsin <12408980+muhsin-k@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:14:09 +04:00
..
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 fix(widget): Queue SDK-set conversation attributes and labels for first message (#13912) 2026-04-02 12:09:24 +04:00
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 feat: allow zero conversation limit capacity policy (#13964) 2026-04-06 11:39:14 +05:30
jobs fix: remove bulk_auto_assignment_job cron schedule (#13877) 2026-03-31 10:56:59 +05:30
listeners fix(agent-bot): Include changed_attributes in conversation_updated webhook (#14001) 2026-04-06 11:14:09 +04:00
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: scope external_url override to Instagram DM conversations only (#13982) 2026-04-02 19:56:23 +05:30
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(line): Use non-expiring URLs for image and video messages (#13949) 2026-04-01 17:29:12 +05:30
views revert: html background for widget (#13981) 2026-04-02 16:02:22 +05:30