From 25090dbf1750f44050c9a5b76495a994a093e816 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Tue, 16 Jun 2026 18:41:44 -0400 Subject: [PATCH] fix(chat): prevent false-positive unread indicators from title generation, pin/archive/folder actions, and new chat creation (#25912) --- backend/open_webui/models/chats.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/models/chats.py b/backend/open_webui/models/chats.py index a04eab8ad8..9dfeeab491 100644 --- a/backend/open_webui/models/chats.py +++ b/backend/open_webui/models/chats.py @@ -309,6 +309,7 @@ class ChatTable: 'folder_id': form_data.folder_id, 'created_at': int(time.time()), 'updated_at': int(time.time()), + 'last_read_at': int(time.time()), } ) @@ -445,7 +446,6 @@ class ChatTable: clean_title = self._clean_null_bytes(title) chat_item.title = clean_title chat_item.chat = {**(chat_item.chat or {}), 'title': clean_title} - chat_item.updated_at = int(time.time()) await session.commit() await session.refresh(chat_item) return ChatModel.model_validate(chat_item) @@ -748,6 +748,7 @@ class ChatTable: chat = await session.get(Chat, id) chat.pinned = not chat.pinned chat.updated_at = int(time.time()) + chat.last_read_at = int(time.time()) await session.commit() await session.refresh(chat) return ChatModel.model_validate(chat) @@ -761,6 +762,7 @@ class ChatTable: chat.archived = not chat.archived chat.folder_id = None chat.updated_at = int(time.time()) + chat.last_read_at = int(time.time()) await session.commit() await session.refresh(chat) return ChatModel.model_validate(chat) @@ -1427,6 +1429,7 @@ class ChatTable: 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 await session.commit() await session.refresh(chat)