fix(chat): 聊天消息预览查询条件缺失

This commit is contained in:
xingc
2025-05-16 17:13:31 +08:00
parent 00ef8d8971
commit e47e9175d9
3 changed files with 7 additions and 15 deletions

View File

@@ -34,7 +34,7 @@ chat_router = APIRouter(prefix='/chat', tags=['聊天模块'])
@chat_router.get(
'/all/', summary='获取所有聊天',
response_model=base_schema.BaseResponse[
base_schema.PaginatedCursor[
base_schema.Paginated[
List[schema.ChatUnreadOut]
]
]
@@ -83,7 +83,7 @@ async def get_all_chats(
@chat_router.get(
'/{chat_guid}/messages/', summary='获取单个聊天的历史消息',
response_model=base_schema.BaseResponse[
base_schema.PaginatedCursor[
base_schema.Paginated[
List[schema.MessageOut]
]
]
@@ -135,7 +135,6 @@ async def get_single_chat_messages(
return {
'data': {
'list': results,
'cursor': results[-1].get('id'),
'next_page': (page * page_size) < total,
'total': total,
'page': page,