summaryrefslogtreecommitdiff
path: root/internal/processing/status/unboost.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/status/unboost.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/status/unboost.go')
-rw-r--r--internal/processing/status/unboost.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/internal/processing/status/unboost.go b/internal/processing/status/unboost.go
index 75158fd40..113a99b18 100644
--- a/internal/processing/status/unboost.go
+++ b/internal/processing/status/unboost.go
@@ -78,14 +78,8 @@ func (p *processor) Unboost(ctx context.Context, requestingAccount *gtsmodel.Acc
}
if toUnboost {
- // we had a boost, so take some action to get rid of it
- if err := p.db.DeleteWhere(ctx, where, &gtsmodel.Status{}); err != nil {
- return nil, gtserror.NewErrorInternalError(fmt.Errorf("error unboosting status: %s", err))
- }
-
// pin some stuff onto the boost while we have it out of the db
gtsBoost.Account = requestingAccount
-
gtsBoost.BoostOf = targetStatus
gtsBoost.BoostOfAccount = targetStatus.Account
gtsBoost.BoostOf.Account = targetStatus.Account