mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-13 05:17:30 -06:00
simplify timeline cache loading, fix lo/hi returns, fix timeline invalidation side-effects missing for some federated actions
This commit is contained in:
parent
f8af213259
commit
53817c23fd
12 changed files with 311 additions and 279 deletions
|
|
@ -70,8 +70,7 @@ func (p *Processor) getStatusTimeline(
|
|||
pageQuery url.Values,
|
||||
filterCtx statusfilter.FilterContext,
|
||||
loadPage func(*paging.Page) (statuses []*gtsmodel.Status, err error),
|
||||
preFilter func(*gtsmodel.Status) (bool, error),
|
||||
postFilter func(*gtsmodel.Status) (bool, error),
|
||||
filter func(*gtsmodel.Status) (bool, error),
|
||||
) (
|
||||
*apimodel.PageableResponse,
|
||||
gtserror.WithCode,
|
||||
|
|
@ -128,13 +127,9 @@ func (p *Processor) getStatusTimeline(
|
|||
return p.state.DB.GetStatusesByIDs(ctx, ids)
|
||||
},
|
||||
|
||||
// Pre-filtering function,
|
||||
// Filtering function,
|
||||
// i.e. filter before caching.
|
||||
preFilter,
|
||||
|
||||
// Post-filtering function,
|
||||
// i.e. filter after caching.
|
||||
postFilter,
|
||||
filter,
|
||||
|
||||
// Frontend API model preparation function.
|
||||
func(status *gtsmodel.Status) (*apimodel.Status, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue