mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-10 08:13:46 +00:00
fix: load app config on archive and update conversation routes
The /archive and /update routes call saveConvo with req.config.interfaceConfig but did not run configMiddleware, so req.config was undefined. After enabling ephemeral retention, archiving or renaming a pre-existing permanent conversation left it non-temporary with no expiredAt, bypassing the policy. Apply configMiddleware to both routes so saves enforce retention consistently.
This commit is contained in:
parent
adb17c83f8
commit
9a5e63695e
1 changed files with 2 additions and 2 deletions
|
|
@ -174,7 +174,7 @@ router.delete('/all', async (req, res) => {
|
|||
* @param {boolean} req.body.arg.isArchived - Whether to archive (true) or unarchive (false).
|
||||
* @returns {object} 200 - The updated conversation object.
|
||||
*/
|
||||
router.post('/archive', validateConvoAccess, async (req, res) => {
|
||||
router.post('/archive', validateConvoAccess, configMiddleware, async (req, res) => {
|
||||
const { conversationId, isArchived } = req.body?.arg ?? {};
|
||||
|
||||
if (!conversationId) {
|
||||
|
|
@ -240,7 +240,7 @@ const MAX_CONVO_TITLE_LENGTH = 1024;
|
|||
* @param {string} req.body.arg.title - The new title for the conversation.
|
||||
* @returns {object} 201 - The updated conversation object.
|
||||
*/
|
||||
router.post('/update', validateConvoAccess, async (req, res) => {
|
||||
router.post('/update', validateConvoAccess, configMiddleware, async (req, res) => {
|
||||
const { conversationId, title } = req.body?.arg ?? {};
|
||||
|
||||
if (!conversationId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue