mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 01:32:25 -05:00
[chore] Add interaction filter to complement existing visibility filter (#3111)
* [chore] Add interaction filter to complement existing visibility filter
* pass in ptr to visibility and interaction filters to Processor{} to ensure shared
* use int constants for for match type, cache db calls in filterctx
* function name typo 😇
---------
Co-authored-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
63fc9b6c3e
commit
c9b6220fef
61 changed files with 1661 additions and 585 deletions
|
|
@ -36,6 +36,7 @@ import (
|
|||
"github.com/superseriousbusiness/gotosocial/internal/api"
|
||||
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/filter/interaction"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/filter/spam"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/filter/visibility"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
|
||||
|
|
@ -190,10 +191,19 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
oauthServer := oauth.New(ctx, dbService)
|
||||
typeConverter := typeutils.NewConverter(state)
|
||||
visFilter := visibility.NewFilter(state)
|
||||
intFilter := interaction.NewFilter(state)
|
||||
spamFilter := spam.NewFilter(state)
|
||||
federatingDB := federatingdb.New(state, typeConverter, visFilter, spamFilter)
|
||||
transportController := transport.NewController(state, federatingDB, &federation.Clock{}, client)
|
||||
federator := federation.NewFederator(state, federatingDB, transportController, typeConverter, visFilter, mediaManager)
|
||||
federator := federation.NewFederator(
|
||||
state,
|
||||
federatingDB,
|
||||
transportController,
|
||||
typeConverter,
|
||||
visFilter,
|
||||
intFilter,
|
||||
mediaManager,
|
||||
)
|
||||
|
||||
// Decide whether to create a noop email
|
||||
// sender (won't send emails) or a real one.
|
||||
|
|
@ -268,6 +278,8 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
mediaManager,
|
||||
state,
|
||||
emailSender,
|
||||
visFilter,
|
||||
intFilter,
|
||||
)
|
||||
|
||||
// Initialize the specialized workers pools.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue