iachat/app
Sojan Jose 199dcd382e
fix: Skip redundant contact saves in ContactIdentifyAction (#13778)
When the SDK sends identify calls with identical payloads (common on
every page load), `save!` fires even though no attributes changed. While
Rails skips the actual UPDATE SQL, it still opens a transaction, runs
all callbacks (including validation queries like `Contact Exists?`), and
triggers `after_commit` hooks — all for a no-op.

This adds a `changed?` guard before `save!` to skip it entirely when no
attributes have actually changed.

**How to test**

- Trigger an identify call via the SDK with a contact's existing
attributes (same name, email, custom_attributes, etc.)
- The contact should not fire a save (no transaction, no callbacks)
- Trigger an identify call with a changed attribute — save should work
normally

**What changed**

- `ContactIdentifyAction#update_contact`: guard `save!` with `changed?`
check
- Added specs to verify `save!` is skipped for unchanged params and
avatar job still enqueues independently
2026-03-11 21:40:38 -07: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: optimize message query with account_id filter (#13759) 2026-03-10 16:46:20 -07: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 Merge branch 'hotfix/4.11.2' into develop 2026-03-09 21:20:08 +05:30
javascript fix: Add fix to only allow confirmed agents to used in Agent Assingments at Macros/Automations (#13225) 2026-03-11 02:01:53 -07:00
jobs feat: Add automatic favicon fetching for companies (#13013) 2026-03-05 18:51:28 -08:00
listeners feat: allow agent bots to toggle typing status (#13705) 2026-03-05 08:13:52 -08:00
mailboxes refactor: strategy pattern for mailbox conversation finding (#12766) 2025-11-10 20:47:18 +05:30
mailers feat: add per-account daily rate limit for outbound emails (#13411) 2026-02-03 02:06:51 +05:30
models chore: Remove message touch:true, use combined update query (#13770) 2026-03-11 07:31:46 -07:00
policies feat(help-center): enable drag-and-drop category reordering (#13706) 2026-03-05 12:53:38 +05:30
presenters fix: Force account_id to use index on messages query on conversation push_event_data (#13757) 2026-03-11 01:03:18 +05:30
services fix: Add fix to only allow confirmed agents to used in Agent Assingments at Macros/Automations (#13225) 2026-03-11 02:01:53 -07:00
views refactor: extract custom attribute methods from FilterService (#13743) 2026-03-10 14:15:52 +05:30