diff options
Diffstat (limited to 'internal/processing/status')
-rw-r--r-- | internal/processing/status/delete.go | 6 | ||||
-rw-r--r-- | internal/processing/status/unboost.go | 6 |
2 files changed, 1 insertions, 11 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, 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, >smodel.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 |