diff --git a/internal/processing/timeline/public.go b/internal/processing/timeline/public.go index 3c02b0d62..915f3c8b0 100644 --- a/internal/processing/timeline/public.go +++ b/internal/processing/timeline/public.go @@ -57,8 +57,8 @@ func (p *Processor) publicTimelineGet( // account. requester, - // Global public timeline cache. - &p.state.Caches.Timelines.Public, + // Keyed-by-account-ID, public timeline cache. + p.state.Caches.Timelines.Public.MustGet(requester.ID), // Current // page. @@ -110,8 +110,8 @@ func (p *Processor) localTimelineGet( // account. requester, - // Global local timeline cache. - &p.state.Caches.Timelines.Local, + // Keyed-by-account-ID, local timeline cache. + p.state.Caches.Timelines.Local.MustGet(requester.ID), // Current // page. diff --git a/internal/processing/timeline/public_test.go b/internal/processing/timeline/public_test.go index 1451d1ac9..e69016efc 100644 --- a/internal/processing/timeline/public_test.go +++ b/internal/processing/timeline/public_test.go @@ -155,7 +155,7 @@ func (suite *PublicTestSuite) TestPublicTimelineGetHideFiltered() { } // Clear the timeline to drop all cached statuses. - suite.state.Caches.Timelines.Public.Clear() + suite.state.Caches.Timelines.Public.ClearAll() // Create a filter to hide one status on the timeline. if err := suite.db.PutFilter(ctx, filter); err != nil { diff --git a/internal/processing/workers/surfacetimeline.go b/internal/processing/workers/surfacetimeline.go index 09e26fec0..a69d673b9 100644 --- a/internal/processing/workers/surfacetimeline.go +++ b/internal/processing/workers/surfacetimeline.go @@ -21,7 +21,7 @@ import ( "context" "errors" - timeline2 "github.com/superseriousbusiness/gotosocial/internal/cache/timeline" + "github.com/superseriousbusiness/gotosocial/internal/cache/timeline" statusfilter "github.com/superseriousbusiness/gotosocial/internal/filter/status" "github.com/superseriousbusiness/gotosocial/internal/filter/usermute" "github.com/superseriousbusiness/gotosocial/internal/gtscontext" @@ -356,16 +356,11 @@ func (s *Surface) listEligible( } } -// timelineStatus uses the provided ingest function to put the given -// status in a timeline with the given ID, if it's timelineable. -// -// If the status was inserted into the timeline, true will be returned -// + it will also be streamed to the user using the given streamType. - -// timelineStatus ... +// timelineStatus will insert the given status into the given timeline, if it's +// timelineable. if the status was inserted into the timeline, true will be returned. func (s *Surface) timelineStatus( ctx context.Context, - timeline *timeline2.StatusTimeline, + timeline *timeline.StatusTimeline, account *gtsmodel.Account, status *gtsmodel.Status, streamType string,