freescout2ant/Jobs
Claude fc5a3d949a
Fix archived replies not retried after re-login (#39)
The core bug was in CrmApiClient::archiveConversation() which returned a
truthy error array on token failures, causing archiveConversationData()
to mark threads as archived even though the CRM API was never called.

Changes:
- Return false (not error array) from archiveConversation() on token error
- Add `last_error` column to crm_archive_threads to track failed archivals
- Record failures in CrmArchiveThread so the cron can retry them
- Update ArchiveThreads command to retry failed entries and skip
  disconnected users (no token file)
- Wrap ArchiveThreadsJob in try-catch to track unexpected exceptions
- Use CrmArchive as source for conversation IDs (more reliable)

https://claude.ai/code/session_01Bvg33MSPkDhxo1LJ6kQBxu
2026-04-14 21:50:01 +00:00
..
ArchiveThreadsJob.php Fix archived replies not retried after re-login (#39) 2026-04-14 21:50:01 +00:00