mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:32:25 -05:00
[bugfix] Fix deleted status causing issues when getting bookmark (#1551)
* [bugfix] Delete bookmark when status deleted * [chore] Give bookmark processing func some love * fix paging + embetter tests
This commit is contained in:
parent
074f352709
commit
689a10fe17
3 changed files with 262 additions and 60 deletions
|
|
@ -456,6 +456,11 @@ func (p *Processor) wipeStatus(ctx context.Context, statusToDelete *gtsmodel.Sta
|
|||
return err
|
||||
}
|
||||
|
||||
// delete all bookmarks that point to this status
|
||||
if err := p.db.DeleteWhere(ctx, []db.Where{{Key: "status_id", Value: statusToDelete.ID}}, &[]*gtsmodel.StatusBookmark{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// delete all boosts for this status + remove them from timelines
|
||||
if boosts, err := p.db.GetStatusReblogs(ctx, statusToDelete); err == nil {
|
||||
for _, b := range boosts {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue