Explorar el Código

refac: pinned chat behaviour

Timothy J. Baek hace 7 meses
padre
commit
24f149f686
Se han modificado 1 ficheros con 1 adiciones y 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)