diff options
| author | 2025-12-01 13:19:47 +0100 | |
|---|---|---|
| committer | 2026-01-22 13:26:33 +0100 | |
| commit | a4aad7af1a48cc1f28420b64a44d82e023062a0e (patch) | |
| tree | 3f909b6669da5c0369ed7a8bad9447dfad5fcbff /internal/processing/workers | |
| parent | [bugfix] Return unboosted status with reblogged=false (#4593) (diff) | |
| download | gotosocial-a4aad7af1a48cc1f28420b64a44d82e023062a0e.tar.xz | |
[bugfix] potential race condition on status unboost (#4596)
Moves deletion of a status boost wrapper to the API handler itself, but leaves the side-effects in the worker processing function. Should prevent race conditions resulting from multiple attempted unboosts and brings it more inline with how we perform undo fave.
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4596
Reviewed-by: tobi <kipvandenbos@noreply.codeberg.org>
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing/workers')
| -rw-r--r-- | internal/processing/workers/fromclientapi.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/internal/processing/workers/fromclientapi.go b/internal/processing/workers/fromclientapi.go index 992f6d9e8..75201c7dc 100644 --- a/internal/processing/workers/fromclientapi.go +++ b/internal/processing/workers/fromclientapi.go @@ -916,10 +916,6 @@ func (p *clientAPI) UndoAnnounce(ctx context.Context, cMsg *messages.FromClientA return gtserror.Newf("%T not parseable as *gtsmodel.Status", cMsg.GTSModel) } - if err := p.state.DB.DeleteStatusByID(ctx, status.ID); err != nil { - return gtserror.Newf("db error deleting status: %w", err) - } - // Delete the boost wrapper status from timelines. p.surface.deleteStatusFromTimelines(ctx, status.ID) |
