mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-09 00:27:30 -06:00
fix up more tests, fix missing required changes, etc
This commit is contained in:
parent
61f8da707c
commit
64564496f1
10 changed files with 130 additions and 84 deletions
|
|
@ -531,18 +531,21 @@ func (s *Surface) tagFollowersForStatus(
|
|||
|
||||
// deleteStatusFromTimelines completely removes the given status from all timelines.
|
||||
// It will also stream deletion of the status to all open streams.
|
||||
func (s *Surface) deleteStatusFromTimelines(ctx context.Context, statusID string) error {
|
||||
func (s *Surface) deleteStatusFromTimelines(ctx context.Context, statusID string) {
|
||||
s.State.Caches.Timelines.Public.RemoveByStatusIDs(statusID)
|
||||
s.State.Caches.Timelines.Local.RemoveByStatusIDs(statusID)
|
||||
s.State.Caches.Timelines.Home.RemoveByStatusIDs(statusID)
|
||||
s.State.Caches.Timelines.List.RemoveByStatusIDs(statusID)
|
||||
s.Stream.Delete(ctx, statusID)
|
||||
return nil
|
||||
}
|
||||
|
||||
// invalidateStatusFromTimelines does cache invalidation on the given status by
|
||||
// unpreparing it from all timelines, forcing it to be prepared again (with updated
|
||||
// stats, boost counts, etc) next time it's fetched by the timeline owner. This goes
|
||||
// both for the status itself, and for any boosts of the status.
|
||||
func (s *Surface) invalidateStatusFromTimelines(ctx context.Context, statusID string) {
|
||||
func (s *Surface) invalidateStatusFromTimelines(statusID string) {
|
||||
s.State.Caches.Timelines.Public.UnprepareByStatusIDs(statusID)
|
||||
s.State.Caches.Timelines.Local.UnprepareByStatusIDs(statusID)
|
||||
s.State.Caches.Timelines.Home.UnprepareByStatusIDs(statusID)
|
||||
s.State.Caches.Timelines.List.UnprepareByStatusIDs(statusID)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue