diff options
| author | 2025-06-20 15:38:23 +0200 | |
|---|---|---|
| committer | 2025-06-20 15:38:23 +0200 | |
| commit | 38ff88f0062c2794eda88adcdc5ba3528783d093 (patch) | |
| tree | 7ea29c3c0b38bc2a9c93a276b24fca5e17514a15 /internal/processing/status/create.go | |
| parent | [feature] Support incoming avatar/header descriptions (#4275) (diff) | |
| download | gotosocial-38ff88f0062c2794eda88adcdc5ba3528783d093.tar.xz | |
[bugfix] Queue implicit accepts *before* other side effects (#4282)
This PR just fiddles with the order in which we process status create / boost / fave side effects and implicit acceptances. The goal is to try to make sure the Accept message gets sent to a remote instance *before* the interaction with an implicitly accepted status.
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4282
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/processing/status/create.go')
| -rw-r--r-- | internal/processing/status/create.go | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/internal/processing/status/create.go b/internal/processing/status/create.go index 3604d3a4a..1a00d8ab7 100644 --- a/internal/processing/status/create.go +++ b/internal/processing/status/create.go @@ -275,21 +275,6 @@ func (p *Processor) Create( } } - var model any = status - if backfill { - // We specifically wrap backfilled statuses in - // a different type to signal to worker process. - model = >smodel.BackfillStatus{Status: status} - } - - // Send it to the client API worker for async side-effects. - p.state.Workers.Client.Queue.Push(&messages.FromClientAPI{ - APObjectType: ap.ObjectNote, - APActivityType: ap.ActivityCreate, - GTSModel: model, - Origin: requester, - }) - // If the new status replies to a status that // replies to us, use our reply as an implicit // accept of any pending interaction. @@ -307,6 +292,22 @@ func (p *Processor) Create( status.InReplyTo.PendingApproval = util.Ptr(false) } + var model any = status + if backfill { + // We specifically wrap backfilled statuses in + // a different type to signal to worker process. + model = >smodel.BackfillStatus{Status: status} + } + + // Queue remaining create side effects + // (send out status, update timeline, etc). + p.state.Workers.Client.Queue.Push(&messages.FromClientAPI{ + APObjectType: ap.ObjectNote, + APActivityType: ap.ActivityCreate, + GTSModel: model, + Origin: requester, + }) + return p.c.GetAPIStatus(ctx, requester, status) } |
