Announce/boost (#35)

Remote boosts incoming/outgoing now working.
This commit is contained in:
Tobi Smethurst 2021-05-28 19:57:04 +02:00 committed by GitHub
commit 87177d840b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 561 additions and 39 deletions

View file

@ -291,6 +291,15 @@ func (p *processor) StatusBoost(authed *oauth.Auth, targetStatusID string) (*api
return nil, NewErrorInternalError(err)
}
// send it to the processor for async processing
p.fromClientAPI <- gtsmodel.FromClientAPI{
APObjectType: gtsmodel.ActivityStreamsAnnounce,
APActivityType: gtsmodel.ActivityStreamsCreate,
GTSModel: boostWrapperStatus,
OriginAccount: authed.Account,
TargetAccount: targetAccount,
}
// return the frontend representation of the new status to the submitter
mastoStatus, err := p.tc.StatusToMasto(boostWrapperStatus, authed.Account, authed.Account, targetAccount, nil, targetStatus)
if err != nil {