freescout2ant/Database/Migrations
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
..
.gitkeep new code 2023-09-16 16:00:05 +05:30
2023_08_04_081903_create_crm_archives_table.php feedback points 2023-09-16 16:40:31 +05:30
2023_12_16_181355_add_user_id_to_crm_archives_table.php fix: Migration NPE — Null-Check und User-ID statt Objekt verwenden 2026-03-17 09:21:18 +00:00
2023_12_16_190909_create_crm_archive_threads_table.php fix auto archive issue 2023-12-16 19:08:20 +05:30
2026_04_14_000000_add_last_error_to_crm_archive_threads_table.php Fix archived replies not retried after re-login (#39) 2026-04-14 21:50:01 +00:00