[chore] Tidy up status deletion, remove from cache too (#845)

* add func for deleting status from db + cache

* move deletes entirely back to processor
and also only do a delete if the requesting account owns the item being deleted

* tidy up unboost processing

* delete status more efficiently

* fix wrong account id on remote test attachments

* fix federator test
This commit is contained in:
tobi
2022-09-21 19:55:52 +02:00
committed by GitHub
parent 8c20626c51
commit 4cf76a2bfc
12 changed files with 113 additions and 94 deletions

View File

@ -288,6 +288,10 @@ func (p *processor) processUndoAnnounceFromClientAPI(ctx context.Context, client
return errors.New("undo was not parseable as *gtsmodel.Status")
}
if err := p.db.DeleteStatusByID(ctx, boost.ID); err != nil {
return err
}
if err := p.deleteStatusFromTimelines(ctx, boost); err != nil {
return err
}