Explorar o código

refac: pinned chat behaviour

Timothy J. Baek hai 6 meses
pai
achega
24f149f686
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)