浏览代码

refac: pinned chat behaviour

Timothy J. Baek 6 月之前
父节点
当前提交
24f149f686
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/open_webui/apps/webui/models/chats.py

+ 1 - 1
backend/open_webui/apps/webui/models/chats.py

@@ -276,7 +276,7 @@ class ChatTable:
         limit: Optional[int] = None,
     ) -> list[ChatTitleIdResponse]:
         with get_db() as db:
-            query = db.query(Chat).filter_by(user_id=user_id)
+            query = db.query(Chat).filter_by(user_id=user_id, pinned=False)
             if not include_archived:
                 query = query.filter_by(archived=False)