refac: pinned chat behaviour

This commit is contained in:
Timothy J. Baek 2024-10-15 02:52:56 -07:00
parent b4cd503a02
commit 24f149f686

View File

@ -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)