MM-40818: Pass filestore to channels (#19677)
We move away from referencing server struct but pass the filestore service to Channels explicitly. https://mattermost.atlassian.net/browse/MM-40818 ```release-note NONE ``` Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c8eafebecf
Коммит
7664c9d709
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v6/config"
|
||||
"github.com/mattermost/mattermost-server/v6/einterfaces"
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/filestore"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/mlog"
|
||||
"github.com/mattermost/mattermost-server/v6/store"
|
||||
)
|
||||
@@ -65,6 +66,13 @@ func ConfigStore(configStore *config.Store) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func SetFileStore(filestore filestore.FileBackend) Option {
|
||||
return func(s *Server) error {
|
||||
s.filestore = filestore
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func RunEssentialJobs(s *Server) error {
|
||||
s.runEssentialJobs = true
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user