diff options
author | 2022-09-21 19:55:52 +0200 | |
---|---|---|
committer | 2022-09-21 19:55:52 +0200 | |
commit | 4cf76a2bfcc2c19bdd34f1bd58d8545d3499481b (patch) | |
tree | 47f558153875675cd7e4d0109e1028d2101ff8da /internal/processing/status/delete.go | |
parent | [docs] Add --config-path to example CLI commands where needed. (#843) (diff) | |
download | gotosocial-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/delete.go')
-rw-r--r-- | internal/processing/status/delete.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/processing/status/delete.go b/internal/processing/status/delete.go index 6db0d9890..a5c6c27bf 100644 --- a/internal/processing/status/delete.go +++ b/internal/processing/status/delete.go @@ -48,11 +48,7 @@ func (p *processor) Delete(ctx context.Context, requestingAccount *gtsmodel.Acco return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting status %s to frontend representation: %s", targetStatus.ID, err)) } - if err := p.db.DeleteByID(ctx, targetStatus.ID, >smodel.Status{}); err != nil { - return nil, gtserror.NewErrorInternalError(fmt.Errorf("error deleting status from the database: %s", err)) - } - - // send it back to the processor for async processing + // send the status back to the processor for async processing p.clientWorker.Queue(messages.FromClientAPI{ APObjectType: ap.ObjectNote, APActivityType: ap.ActivityDelete, |