diff options
author | 2024-07-24 13:27:42 +0200 | |
---|---|---|
committer | 2024-07-24 12:27:42 +0100 | |
commit | c9b6220fef01dce80a31436660cd06b4e1db030f (patch) | |
tree | 5fbade865a920a5ea04fdd63763eca1880d60c5d /internal/processing/timeline/home.go | |
parent | [chore] renames the `GTS` caches to `DB` caches (#3127) (diff) | |
download | gotosocial-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 'internal/processing/timeline/home.go')
-rw-r--r-- | internal/processing/timeline/home.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/timeline/home.go b/internal/processing/timeline/home.go index 8bf8dd428..215000933 100644 --- a/internal/processing/timeline/home.go +++ b/internal/processing/timeline/home.go @@ -62,7 +62,7 @@ func HomeTimelineGrab(state *state.State) timeline.GrabFunction { } // HomeTimelineFilter returns a function that satisfies FilterFunction for home timelines. -func HomeTimelineFilter(state *state.State, filter *visibility.Filter) timeline.FilterFunction { +func HomeTimelineFilter(state *state.State, visFilter *visibility.Filter) timeline.FilterFunction { return func(ctx context.Context, accountID string, item timeline.Timelineable) (shouldIndex bool, err error) { status, ok := item.(*gtsmodel.Status) if !ok { @@ -76,7 +76,7 @@ func HomeTimelineFilter(state *state.State, filter *visibility.Filter) timeline. return false, err } - timelineable, err := filter.StatusHomeTimelineable(ctx, requestingAccount, status) + timelineable, err := visFilter.StatusHomeTimelineable(ctx, requestingAccount, status) if err != nil { err = gtserror.Newf("error checking hometimelineability of status %s for account %s: %w", status.ID, accountID, err) return false, err |