diff options
Diffstat (limited to 'internal/processing/filters/v1')
| -rw-r--r-- | internal/processing/filters/v1/create.go | 4 | ||||
| -rw-r--r-- | internal/processing/filters/v1/delete.go | 4 | ||||
| -rw-r--r-- | internal/processing/filters/v1/filters.go | 5 | ||||
| -rw-r--r-- | internal/processing/filters/v1/update.go | 4 |
4 files changed, 7 insertions, 10 deletions
diff --git a/internal/processing/filters/v1/create.go b/internal/processing/filters/v1/create.go index b2ec69442..9f3fc17e0 100644 --- a/internal/processing/filters/v1/create.go +++ b/internal/processing/filters/v1/create.go @@ -91,8 +91,8 @@ func (p *Processor) Create(ctx context.Context, requester *gtsmodel.Account, for return nil, gtserror.NewErrorInternalError(err) } - // Stream a filters changed event to WS. - p.stream.FiltersChanged(ctx, requester) + // Handle filter change side-effects. + p.c.OnFilterChanged(ctx, requester) // Return as converted frontend filter keyword model. return typeutils.FilterKeywordToAPIFilterV1(filter, filterKeyword), nil diff --git a/internal/processing/filters/v1/delete.go b/internal/processing/filters/v1/delete.go index cab8b185d..65768140a 100644 --- a/internal/processing/filters/v1/delete.go +++ b/internal/processing/filters/v1/delete.go @@ -63,8 +63,8 @@ func (p *Processor) Delete( } } - // Stream a filters changed event to WS. - p.stream.FiltersChanged(ctx, requester) + // Handle filter change side-effects. + p.c.OnFilterChanged(ctx, requester) return nil } diff --git a/internal/processing/filters/v1/filters.go b/internal/processing/filters/v1/filters.go index bcbbd70c0..4492b4e76 100644 --- a/internal/processing/filters/v1/filters.go +++ b/internal/processing/filters/v1/filters.go @@ -19,7 +19,6 @@ package v1 import ( "code.superseriousbusiness.org/gotosocial/internal/processing/filters/common" - "code.superseriousbusiness.org/gotosocial/internal/processing/stream" "code.superseriousbusiness.org/gotosocial/internal/state" "code.superseriousbusiness.org/gotosocial/internal/typeutils" ) @@ -30,15 +29,13 @@ type Processor struct { state *state.State converter *typeutils.Converter - stream *stream.Processor } -func New(state *state.State, converter *typeutils.Converter, common *common.Processor, stream *stream.Processor) Processor { +func New(state *state.State, converter *typeutils.Converter, common *common.Processor) Processor { return Processor{ c: common, state: state, converter: converter, - stream: stream, } } diff --git a/internal/processing/filters/v1/update.go b/internal/processing/filters/v1/update.go index 7e25e6fde..19699f328 100644 --- a/internal/processing/filters/v1/update.go +++ b/internal/processing/filters/v1/update.go @@ -166,8 +166,8 @@ func (p *Processor) Update( return nil, gtserror.NewErrorInternalError(err) } - // Stream a filters changed event to WS. - p.stream.FiltersChanged(ctx, requester) + // Handle filter change side-effects. + p.c.OnFilterChanged(ctx, requester) // Return as converted frontend filter keyword model. return typeutils.FilterKeywordToAPIFilterV1(filter, filterKeyword), nil |
