summaryrefslogtreecommitdiff
path: root/internal/processing/status/boost.go
diff options
context:
space:
mode:
authorLibravatar tobi <tobi.smethurst@protonmail.com>2025-06-20 15:38:23 +0200
committerLibravatar tobi <kipvandenbos@noreply.codeberg.org>2025-06-20 15:38:23 +0200
commit38ff88f0062c2794eda88adcdc5ba3528783d093 (patch)
tree7ea29c3c0b38bc2a9c93a276b24fca5e17514a15 /internal/processing/status/boost.go
parent[feature] Support incoming avatar/header descriptions (#4275) (diff)
downloadgotosocial-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/boost.go')
-rw-r--r--internal/processing/status/boost.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/internal/processing/status/boost.go b/internal/processing/status/boost.go
index 7c7162c12..4a97706ab 100644
--- a/internal/processing/status/boost.go
+++ b/internal/processing/status/boost.go
@@ -130,15 +130,6 @@ func (p *Processor) BoostCreate(
return nil, gtserror.NewErrorInternalError(err)
}
- // Process side effects asynchronously.
- p.state.Workers.Client.Queue.Push(&messages.FromClientAPI{
- APObjectType: ap.ActivityAnnounce,
- APActivityType: ap.ActivityCreate,
- GTSModel: boost,
- Origin: requester,
- Target: target.Account,
- })
-
// If the boost target status replies to a status
// that we own, and has a pending interaction
// request, use the boost as an implicit accept.
@@ -156,6 +147,16 @@ func (p *Processor) BoostCreate(
target.PendingApproval = util.Ptr(false)
}
+ // Queue remaining boost side effects
+ // (send out boost, update timeline, etc).
+ p.state.Workers.Client.Queue.Push(&messages.FromClientAPI{
+ APObjectType: ap.ActivityAnnounce,
+ APActivityType: ap.ActivityCreate,
+ GTSModel: boost,
+ Origin: requester,
+ Target: target.Account,
+ })
+
return p.c.GetAPIStatus(ctx, requester, boost)
}