mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-02 20:32:58 +00:00
Capping every forced message save to the parent expiry broke the normal send paths: POST /api/messages/:conversationId and BaseClient.saveMessageToDatabase call saveConvo right after saveMessage, refreshing the conversation to a fresh TTL. The message kept the older parent deadline, so the message TTL index could delete the just-sent message while the conversation stayed visible until the later deadline. Gate the cap behind a capExpiryToConversation flag that only the message-only callers (branch, artifact, abort) set, since those never run saveConvo. Normal sends leave the message on its fresh deadline, which the following saveConvo refresh keeps aligned. The conversion/re-cap cascade still runs for every forced save. |
||
|---|---|---|
| .. | ||
| controllers | ||
| middleware | ||
| routes | ||
| services | ||
| utils | ||
| cleanup.js | ||
| experimental.js | ||
| index.js | ||
| index.metrics.spec.js | ||
| index.spec.js | ||
| socialLogins.js | ||
| socialLogins.spec.js | ||
| telemetry.js | ||
| telemetry.spec.js | ||