fix: preserve chat recency when moving between folders

Keep the existing updated_at when folder_id changes so organizing a conversation does not move it ahead of more recent activity. Fixes #30362.

Assisted-by: OpenAI Codex
This commit is contained in:
bianyh 2026-10-13 21:46:00 +08:00
parent be6f0a6656
commit b40965112e

View file

@ -2441,7 +2441,6 @@ class ChatTable:
async with get_async_db_context(db) as session:
chat = await session.get(Chat, id)
chat.folder_id = folder_id
chat.updated_at = int(time.time())
chat.last_read_at = int(time.time())
chat.pinned = False
if folder_id is not None: