mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 12:47:29 -06:00
[feature] Add experimental instance-federation-spam-filter option (#2685)
* [chore] Move `visibility` to `filter/visibility` * [feature] Add experimental instance-federation-spam-filter option
This commit is contained in:
parent
87e8cca3ae
commit
9cadc764b3
80 changed files with 1638 additions and 137 deletions
|
|
@ -65,6 +65,7 @@ var testDefaults = config.Configuration{
|
|||
WebAssetBaseDir: "./web/assets/",
|
||||
|
||||
InstanceFederationMode: config.InstanceFederationModeDefault,
|
||||
InstanceFederationSpamFilter: true,
|
||||
InstanceExposePeers: true,
|
||||
InstanceExposeSuspended: true,
|
||||
InstanceExposeSuspendedWeb: true,
|
||||
|
|
|
|||
|
|
@ -19,12 +19,18 @@ package testrig
|
|||
|
||||
import (
|
||||
"github.com/superseriousbusiness/gotosocial/internal/federation/federatingdb"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/filter/spam"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/state"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/visibility"
|
||||
)
|
||||
|
||||
// NewTestFederatingDB returns a federating DB with the underlying db
|
||||
func NewTestFederatingDB(state *state.State) federatingdb.DB {
|
||||
return federatingdb.New(state, typeutils.NewConverter(state), visibility.NewFilter(state))
|
||||
return federatingdb.New(
|
||||
state,
|
||||
typeutils.NewConverter(state),
|
||||
visibility.NewFilter(state),
|
||||
spam.NewFilter(state),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/messages"
|
||||
tlprocessor "github.com/superseriousbusiness/gotosocial/internal/processing/timeline"
|
||||
wprocessor "github.com/superseriousbusiness/gotosocial/internal/processing/workers"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/state"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/timeline"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/visibility"
|
||||
)
|
||||
|
||||
// Starts workers on the provided state using noop processing functions.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue