summaryrefslogtreecommitdiff
path: root/internal/processing/fromclientapi.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-09-21 19:55:52 +0200
committerLibravatar GitHub <noreply@github.com>2022-09-21 19:55:52 +0200
commit4cf76a2bfcc2c19bdd34f1bd58d8545d3499481b (patch)
tree47f558153875675cd7e4d0109e1028d2101ff8da /internal/processing/fromclientapi.go
parent[docs] Add --config-path to example CLI commands where needed. (#843) (diff)
downloadgotosocial-4cf76a2bfcc2c19bdd34f1bd58d8545d3499481b.tar.xz
[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
Diffstat (limited to 'internal/processing/fromclientapi.go')
-rw-r--r--internal/processing/fromclientapi.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/processing/fromclientapi.go b/internal/processing/fromclientapi.go
index 2c4f20d81..d7c9c5d82 100644
--- a/internal/processing/fromclientapi.go
+++ b/internal/processing/fromclientapi.go
@@ -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
}