summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-07-24 13:27:42 +0200
committerLibravatar GitHub <noreply@github.com>2024-07-24 12:27:42 +0100
commitc9b6220fef01dce80a31436660cd06b4e1db030f (patch)
tree5fbade865a920a5ea04fdd63763eca1880d60c5d /cmd
parent[chore] renames the `GTS` caches to `DB` caches (#3127) (diff)
downloadgotosocial-c9b6220fef01dce80a31436660cd06b4e1db030f.tar.xz
[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 :innocent: --------- Co-authored-by: kim <grufwub@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotosocial/action/server/server.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/cmd/gotosocial/action/server/server.go b/cmd/gotosocial/action/server/server.go
index 475804218..42cbf318b 100644
--- a/cmd/gotosocial/action/server/server.go
+++ b/cmd/gotosocial/action/server/server.go
@@ -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.