mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:22:24 -05:00
[bugfix] Invalidate timeline entries for status when stats change (#1879)
This commit is contained in:
parent
84e1c7a7c4
commit
5e2897e35c
12 changed files with 531 additions and 130 deletions
|
|
@ -53,7 +53,12 @@ func (p *Processor) BookmarkCreate(ctx context.Context, requestingAccount *gtsmo
|
|||
}
|
||||
|
||||
if err := p.state.DB.PutStatusBookmark(ctx, gtsBookmark); err != nil {
|
||||
err = fmt.Errorf("BookmarkCreate: error putting bookmark in database: %w", err)
|
||||
err = gtserror.Newf("error putting bookmark in database: %w", err)
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
||||
if err := p.invalidateStatus(ctx, requestingAccount.ID, targetStatusID); err != nil {
|
||||
err = gtserror.Newf("error invalidating status from timelines: %w", err)
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +79,12 @@ func (p *Processor) BookmarkRemove(ctx context.Context, requestingAccount *gtsmo
|
|||
|
||||
// We have a bookmark to remove.
|
||||
if err := p.state.DB.DeleteStatusBookmark(ctx, existingBookmarkID); err != nil {
|
||||
err = fmt.Errorf("BookmarkRemove: error removing status bookmark: %w", err)
|
||||
err = gtserror.Newf("error removing status bookmark: %w", err)
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
||||
if err := p.invalidateStatus(ctx, requestingAccount.ID, targetStatusID); err != nil {
|
||||
err = gtserror.Newf("error invalidating status from timelines: %w", err)
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue