iachat/app
Tanmay Deep Sharma 2b50909d9b
fix: use last_activity_at for orphan conversation cleanup timeframe (#13859)
## Description

The RemoveOrphanConversationsService filters orphan conversations by a
time window before deleting them. Previously it used created_at, which
could miss old conversations that still had recent activity.
Switching to last_activity_at ensures the cleanup window reflects actual
conversation activity rather than creation time.

## Type of change

Please delete options that are not relevant.

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

## How Has This Been Tested?

- By running Rake task 
- Run the job from console 

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2026-03-20 16:28:05 +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 feat(widget): Allow widget loading in mobile app WebViews when domain restrictions are set (#13763) 2026-03-17 14:29:41 +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 captain to access contact attributes (#13850) 2026-03-20 16:15:06 +05:30
jobs feat: distributed scheduling for version check job (#13042) 2026-03-17 02:27:49 -07: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 feat(rollup): add models and write path [1/3] (#13796) 2026-03-19 13:12:36 +05:30
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: use last_activity_at for orphan conversation cleanup timeframe (#13859) 2026-03-20 16:28:05 +05:30
views fix: return correct outgoing_url in Platform agent bot API responses (#13827) 2026-03-17 13:40:45 -07:00