mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-28 20:02:24 -05:00
[feature] Allow users to set default interaction policies per status visibility (#3108)
* [feature] Allow users to set default interaction policies * use vars for default policies * avoid some code repetition * unfuck form binding * avoid bonkers loop * beep boop * put policyValsToAPIPolicyVals in separate function * don't bother with slices.Grow * oops
This commit is contained in:
parent
401098191b
commit
0aadc2db2a
36 changed files with 3178 additions and 316 deletions
|
|
@ -155,10 +155,6 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
}
|
||||
testrig.StandardStorageSetup(state.Storage, "./testrig/media")
|
||||
|
||||
// Initialize workers.
|
||||
testrig.StartNoopWorkers(state)
|
||||
defer testrig.StopWorkers(state)
|
||||
|
||||
// build backend handlers
|
||||
transportController := testrig.NewTestTransportController(state, testrig.NewMockHTTPClient(func(req *http.Request) (*http.Response, error) {
|
||||
r := io.NopCloser(bytes.NewReader([]byte{}))
|
||||
|
|
@ -199,6 +195,10 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
|
||||
processor := testrig.NewTestProcessor(state, federator, emailSender, mediaManager)
|
||||
|
||||
// Initialize workers.
|
||||
testrig.StartWorkers(state, processor.Workers())
|
||||
defer testrig.StopWorkers(state)
|
||||
|
||||
// Initialize metrics.
|
||||
if err := metrics.Initialize(state.DB); err != nil {
|
||||
return fmt.Errorf("error initializing metrics: %w", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue