diff options
Diffstat (limited to 'internal/processing/timeline')
-rw-r--r-- | internal/processing/timeline/faved.go | 2 | ||||
-rw-r--r-- | internal/processing/timeline/home.go | 4 | ||||
-rw-r--r-- | internal/processing/timeline/list.go | 4 | ||||
-rw-r--r-- | internal/processing/timeline/notification.go | 4 | ||||
-rw-r--r-- | internal/processing/timeline/public.go | 2 | ||||
-rw-r--r-- | internal/processing/timeline/tag.go | 2 | ||||
-rw-r--r-- | internal/processing/timeline/timeline.go | 6 |
7 files changed, 12 insertions, 12 deletions
diff --git a/internal/processing/timeline/faved.go b/internal/processing/timeline/faved.go index cd3729465..bb7f03fff 100644 --- a/internal/processing/timeline/faved.go +++ b/internal/processing/timeline/faved.go @@ -45,7 +45,7 @@ func (p *Processor) FavedTimelineGet(ctx context.Context, authed *oauth.Auth, ma items := make([]interface{}, 0, count) for _, s := range statuses { - visible, err := p.filter.StatusVisible(ctx, authed.Account, s) + visible, err := p.visFilter.StatusVisible(ctx, authed.Account, s) if err != nil { log.Errorf(ctx, "error checking status visibility: %v", err) continue 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 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 diff --git a/internal/processing/timeline/notification.go b/internal/processing/timeline/notification.go index 0db4080b9..34e6d865d 100644 --- a/internal/processing/timeline/notification.go +++ b/internal/processing/timeline/notification.go @@ -190,7 +190,7 @@ func (p *Processor) notifVisible( return true, nil } - visible, err := p.filter.AccountVisible(ctx, acct, n.OriginAccount) + visible, err := p.visFilter.AccountVisible(ctx, acct, n.OriginAccount) if err != nil { return false, err } @@ -203,7 +203,7 @@ func (p *Processor) notifVisible( // If status is set, ensure it's // visible to notif target. if n.Status != nil { - visible, err := p.filter.StatusVisible(ctx, acct, n.Status) + visible, err := p.visFilter.StatusVisible(ctx, acct, n.Status) if err != nil { return false, err } diff --git a/internal/processing/timeline/public.go b/internal/processing/timeline/public.go index 28062fb2e..dc00688e3 100644 --- a/internal/processing/timeline/public.go +++ b/internal/processing/timeline/public.go @@ -98,7 +98,7 @@ outer: // we end up filtering it out or not. nextMaxIDValue = s.ID - timelineable, err := p.filter.StatusPublicTimelineable(ctx, requester, s) + timelineable, err := p.visFilter.StatusPublicTimelineable(ctx, requester, s) if err != nil { log.Errorf(ctx, "error checking status visibility: %v", err) continue inner diff --git a/internal/processing/timeline/tag.go b/internal/processing/timeline/tag.go index 4320f6adc..811d0bb33 100644 --- a/internal/processing/timeline/tag.go +++ b/internal/processing/timeline/tag.go @@ -128,7 +128,7 @@ func (p *Processor) packageTagResponse( compiledMutes := usermute.NewCompiledUserMuteList(mutes) for _, s := range statuses { - timelineable, err := p.filter.StatusTagTimelineable(ctx, requestingAcct, s) + timelineable, err := p.visFilter.StatusTagTimelineable(ctx, requestingAcct, s) if err != nil { log.Errorf(ctx, "error checking status visibility: %v", err) continue diff --git a/internal/processing/timeline/timeline.go b/internal/processing/timeline/timeline.go index b791791ee..5966fe864 100644 --- a/internal/processing/timeline/timeline.go +++ b/internal/processing/timeline/timeline.go @@ -26,13 +26,13 @@ import ( type Processor struct { state *state.State converter *typeutils.Converter - filter *visibility.Filter + visFilter *visibility.Filter } -func New(state *state.State, converter *typeutils.Converter, filter *visibility.Filter) Processor { +func New(state *state.State, converter *typeutils.Converter, visFilter *visibility.Filter) Processor { return Processor{ state: state, converter: converter, - filter: filter, + visFilter: visFilter, } } |