From a4aad7af1a48cc1f28420b64a44d82e023062a0e Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 1 Dec 2025 13:19:47 +0100 Subject: [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 Co-authored-by: kim Co-committed-by: kim --- internal/processing/workers/fromclientapi.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'internal/processing/workers/fromclientapi.go') 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) -- cgit v1.3