diff options
author | 2022-11-14 09:30:01 +0000 | |
---|---|---|
committer | 2022-11-14 10:30:01 +0100 | |
commit | d120743e8bee74bbb6381a6ec017d7fa62b3f13e (patch) | |
tree | 166ab39f161b77cf6055abcc26de370c932c474f /internal/processing | |
parent | [chore]: Bump codeberg.org/gruf/go-cache/v3 from 3.1.7 to 3.1.8 (#1043) (diff) | |
download | gotosocial-d120743e8bee74bbb6381a6ec017d7fa62b3f13e.tar.xz |
[feature] add instance-expose-public-timeline flag (#1039)
* Add instance-expose-public-timeline flag
Adds a config flag that allows unauthenticated access to /api/v1/timelines/public. Defaults to false to replicate existing behaviour.
* Update structure following review
* Add comment
* Fix linting
Diffstat (limited to 'internal/processing')
-rw-r--r-- | internal/processing/statustimeline.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/processing/statustimeline.go b/internal/processing/statustimeline.go index 4491308f3..4600844f5 100644 --- a/internal/processing/statustimeline.go +++ b/internal/processing/statustimeline.go @@ -173,7 +173,7 @@ func (p *processor) HomeTimelineGet(ctx context.Context, authed *oauth.Auth, max } func (p *processor) PublicTimelineGet(ctx context.Context, authed *oauth.Auth, maxID string, sinceID string, minID string, limit int, local bool) (*apimodel.PageableResponse, gtserror.WithCode) { - statuses, err := p.db.GetPublicTimeline(ctx, authed.Account.ID, maxID, sinceID, minID, limit, local) + statuses, err := p.db.GetPublicTimeline(ctx, maxID, sinceID, minID, limit, local) if err != nil { if err == db.ErrNoEntries { // there are just no entries left |