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/list.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/list.go')
-rw-r--r-- | internal/processing/timeline/list.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/timeline/list.go b/internal/processing/timeline/list.go index 2065256e3..a7f5e9d71 100644 --- a/internal/processing/timeline/list.go +++ b/internal/processing/timeline/list.go @@ -62,7 +62,7 @@ func ListTimelineGrab(state *state.State) timeline.GrabFunction { } // ListTimelineFilter returns a function that satisfies FilterFunction for list timelines. -func ListTimelineFilter(state *state.State, filter *visibility.Filter) timeline.FilterFunction { +func ListTimelineFilter(state *state.State, visFilter *visibility.Filter) timeline.FilterFunction { return func(ctx context.Context, listID string, item timeline.Timelineable) (shouldIndex bool, err error) { status, ok := item.(*gtsmodel.Status) if !ok { @@ -82,7 +82,7 @@ func ListTimelineFilter(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, list.AccountID, err) return false, err |