feat: add search APIs and telegram-like chats sidebar flow
All checks were successful
CI / test (push) Successful in 24s
All checks were successful
CI / test (push) Successful in 24s
- implement chat query filtering and message search endpoints - add db indexes for search fields - activate chats search input in web - replace inline create panel with floating TG-style action menu
This commit is contained in:
@@ -31,10 +31,11 @@ router = APIRouter(prefix="/chats", tags=["chats"])
|
||||
async def list_chats(
|
||||
limit: int = 50,
|
||||
before_id: int | None = None,
|
||||
query: str | None = None,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
current_user: User = Depends(get_current_user),
|
||||
) -> list[ChatRead]:
|
||||
return await get_chats_for_user(db, user_id=current_user.id, limit=limit, before_id=before_id)
|
||||
return await get_chats_for_user(db, user_id=current_user.id, limit=limit, before_id=before_id, query=query)
|
||||
|
||||
|
||||
@router.post("", response_model=ChatRead)
|
||||
|
||||
Reference in New Issue
Block a user