perf(message): optimize message loading and reduce SQL queries (#13720)

This commit is contained in:
Hundredwz
2025-02-15 12:19:01 +08:00
committed by GitHub
parent 1f63028a83
commit 284707c3a8
2 changed files with 15 additions and 27 deletions

View File

@@ -70,7 +70,7 @@ class MessageListApi(Resource):
try:
return MessageService.pagination_by_first_id(
app_model, end_user, args["conversation_id"], args["first_id"], args["limit"]
app_model, end_user, args["conversation_id"], args["first_id"], args["limit"], "desc"
)
except services.errors.conversation.ConversationNotExistsError:
raise NotFound("Conversation Not Exists.")