From 9a5e63695ecb25987b0e5a5cf64a68a68340b207 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Thu, 18 Jun 2026 08:38:27 +0200 Subject: [PATCH] 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. --- api/server/routes/convos.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/server/routes/convos.js b/api/server/routes/convos.js index ae185ca6bc..b3dbad3bf4 100644 --- a/api/server/routes/convos.js +++ b/api/server/routes/convos.js @@ -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) {