diff options
author | 2023-02-23 23:11:10 +0100 | |
---|---|---|
committer | 2023-02-23 22:11:10 +0000 | |
commit | 689a10fe176706342704dc75e10d7c1f23d35540 (patch) | |
tree | e3540ce586c1a803c4290f3a06de631a6274e8dd /internal/processing/fromcommon.go | |
parent | [chore] improve opengraph descripiton tag (#1550) (diff) | |
download | gotosocial-689a10fe176706342704dc75e10d7c1f23d35540.tar.xz |
[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
Diffstat (limited to 'internal/processing/fromcommon.go')
-rw-r--r-- | internal/processing/fromcommon.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/processing/fromcommon.go b/internal/processing/fromcommon.go index a09d428e8..3e4c62c6c 100644 --- a/internal/processing/fromcommon.go +++ b/internal/processing/fromcommon.go @@ -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 { |