fix: openapi message list limit default (#803)

This commit is contained in:
junwen-lee 2025-08-18 18:16:21 +08:00 committed by GitHub
parent 85e6926a14
commit 23a468c72c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,10 @@ func (m *OpenapiMessageApplication) GetApiMessageList(ctx context.Context, mr *m
return nil, errorx.New(errno.ErrConversationPermissionCode, errorx.KV("msg", "permission denied")) return nil, errorx.New(errno.ErrConversationPermissionCode, errorx.KV("msg", "permission denied"))
} }
if mr.Limit == nil {
mr.Limit = ptr.Of(int64(50))
}
msgListMeta := &entity.ListMeta{ msgListMeta := &entity.ListMeta{
ConversationID: currentConversation.ID, ConversationID: currentConversation.ID,
AgentID: currentConversation.AgentID, AgentID: currentConversation.AgentID,