mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 22:02:46 +00:00
Configuration format v1 (#1230)
* Initial pass at refactoring config (not finished) * Don't forget current state and EDU servers * More shifting around * Update server key API tests * Fix roomserver test * Fix more tests * Further tweaks * Fix current state server test (sort of) * Maybe fix appservices * Fix client API test * Include database connection string in database options * Fix sync API build * Update config test * Fix unit tests * Fix federation sender build * Fix gobind build * Set Listen address for all services in HTTP monolith mode * Validate config, reinstate appservice derived in directory, tweaks * Tweak federation API test * Set MaxOpenConnections/MaxIdleConnections to previous values * Update generate-config
This commit is contained in:
parent
fdabba1851
commit
4b09f445c9
155 changed files with 1716 additions and 1503 deletions
|
@ -73,7 +73,7 @@ func Download(
|
|||
req *http.Request,
|
||||
origin gomatrixserverlib.ServerName,
|
||||
mediaID types.MediaID,
|
||||
cfg *config.Dendrite,
|
||||
cfg *config.MediaAPI,
|
||||
db storage.Database,
|
||||
client *gomatrixserverlib.Client,
|
||||
activeRemoteRequests *types.ActiveRemoteRequests,
|
||||
|
@ -203,7 +203,7 @@ func (r *downloadRequest) Validate() *util.JSONResponse {
|
|||
func (r *downloadRequest) doDownload(
|
||||
ctx context.Context,
|
||||
w http.ResponseWriter,
|
||||
cfg *config.Dendrite,
|
||||
cfg *config.MediaAPI,
|
||||
db storage.Database,
|
||||
client *gomatrixserverlib.Client,
|
||||
activeRemoteRequests *types.ActiveRemoteRequests,
|
||||
|
@ -233,9 +233,9 @@ func (r *downloadRequest) doDownload(
|
|||
r.MediaMetadata = mediaMetadata
|
||||
}
|
||||
return r.respondFromLocalFile(
|
||||
ctx, w, cfg.Media.AbsBasePath, activeThumbnailGeneration,
|
||||
cfg.Media.MaxThumbnailGenerators, db,
|
||||
cfg.Media.DynamicThumbnails, cfg.Media.ThumbnailSizes,
|
||||
ctx, w, cfg.AbsBasePath, activeThumbnailGeneration,
|
||||
cfg.MaxThumbnailGenerators, db,
|
||||
cfg.DynamicThumbnails, cfg.ThumbnailSizes,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ func (r *downloadRequest) generateThumbnail(
|
|||
func (r *downloadRequest) getRemoteFile(
|
||||
ctx context.Context,
|
||||
client *gomatrixserverlib.Client,
|
||||
cfg *config.Dendrite,
|
||||
cfg *config.MediaAPI,
|
||||
db storage.Database,
|
||||
activeRemoteRequests *types.ActiveRemoteRequests,
|
||||
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
||||
|
@ -550,9 +550,9 @@ func (r *downloadRequest) getRemoteFile(
|
|||
// If we do not have a record, we need to fetch the remote file first and then respond from the local file
|
||||
err := r.fetchRemoteFileAndStoreMetadata(
|
||||
ctx, client,
|
||||
cfg.Media.AbsBasePath, *cfg.Media.MaxFileSizeBytes, db,
|
||||
cfg.Media.ThumbnailSizes, activeThumbnailGeneration,
|
||||
cfg.Media.MaxThumbnailGenerators,
|
||||
cfg.AbsBasePath, *cfg.MaxFileSizeBytes, db,
|
||||
cfg.ThumbnailSizes, activeThumbnailGeneration,
|
||||
cfg.MaxThumbnailGenerators,
|
||||
)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error querying the database.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue