LibreChat/packages
Marco Beretta 7b8272476d
fix: cap referenced attachment files that carry no conversationId
Message-attachment uploads create File rows without a conversationId — they are
referenced only from Message.files[].file_id and the conversation's files array
(only Code Interpreter outputs set conversationId). The conversation-scoped file
caps therefore missed regular attachments entirely: converting a pre-existing
chat left their expiredAt null, so storage cleanup never swept them after the
conversation and messages expired.

Collect the referenced file ids (conversation.files plus one pass over the
chat's messages) and extend the file caps to match file_id as well as
conversationId, in the single cascade, saveConvo, the bulk tag/project cascade,
and both sweep passes. The id scan runs at conversion/alignment time only —
post-conversion uploads always receive a deadline at upload, so conforming-
parent writes keep the cheap conversationId-scoped cap. A file shared across
chats is capped to the earliest converting chat's deadline, consistent with
cap-don't-extend.
2026-07-05 02:43:02 +02:00
..
api fix: enforce ephemeral retention on chat project membership changes 2026-07-03 15:03:09 +02:00
client 🧪 ci: Resolve DataTable test infinite re-render (#13947) 2026-06-24 23:40:18 -04:00
data-provider feat: add ephemeral retention mode for forced temporary chats 2026-06-30 04:51:45 +02:00
data-schemas fix: cap referenced attachment files that carry no conversationId 2026-07-05 02:43:02 +02:00