LibreChat/packages/api
Marco Beretta 75110c70e5
fix: preserve earlier message and file expiries under forced retention
Two leftover paths still extended data that was already scheduled to
expire sooner when forcing ephemeral retention:

- forceConversationMessagesTemporary (and the by-tag message backfill)
  rewrote every gap-matched message to the forced deadline, overwriting
  carried-over `all`-mode messages whose own per-message TTL was already
  sooner. Use a $min aggregation update so each message keeps its earlier
  deadline while still being marked temporary and capped if later.
- File uploads under ephemeral retention skipped the conversation lookup
  and got a fresh TTL, so a new attachment to a chat with a preserved
  earlier expiry could outlive the TTL-deleted conversation. Cap ephemeral
  file expiry to the minimum of the fresh window and the active parent
  conversation expiry, mirroring the message and shared-link paths.
2026-07-01 19:38:20 +02:00
..
src fix: preserve earlier message and file expiries under forced retention 2026-07-01 19:38:20 +02:00
types
.gitignore
babel.config.cjs
jest.config.mjs
jest.setup.cjs
package.json
tsconfig-paths-bootstrap.mjs
tsconfig.build.json
tsconfig.json
tsconfig.spec.json
tsdown.config.mjs