fix: pinned chats in ref chat

This commit is contained in:
Timothy Jaeryang Baek committed 2025-10-14 18:06:29 -05:00
1 parent 9971919ca1
commit 5fe56a862b
4 files changed
+16 -4

No files matched your search

+3 -1
View File
@@ -502,6 +502,7 @@ class ChatTable:
user_id: str,
include_archived: bool = False,
include_folders: bool = False,
include_pinned: bool = False,
skip: Optional[int] = None,
limit: Optional[int] = None,
) -> list[ChatTitleIdResponse]:
@@ -511,7 +512,8 @@ class ChatTable:
if not include_folders:
query = query.filter_by(folder_id=None)
query = query.filter(or_(Chat.pinned == False, Chat.pinned == None))
if not include_pinned:
query = query.filter(or_(Chat.pinned == False, Chat.pinned == None))
if not include_archived:
query = query.filter_by(archived=False)