mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 15:42:24 -05:00
[feature] Forward-compatibility with Approval objects (#3807)
* vendor * [feature] Forward-compatibility with Approval objects * vendor the thing * fix leetle bug * lil syntax tweak for beloved kimb
This commit is contained in:
parent
e220c6a894
commit
96716e4f43
125 changed files with 20960 additions and 2964 deletions
|
|
@ -844,16 +844,16 @@ func (p *fediAPI) AcceptRemoteStatus(ctx context.Context, fMsg *messages.FromFed
|
|||
return gtserror.Newf("%T not parseable as *url.URL", fMsg.APObject)
|
||||
}
|
||||
|
||||
acceptIRI := fMsg.APIRI
|
||||
if acceptIRI == nil {
|
||||
return gtserror.New("acceptIRI was nil")
|
||||
approvedByURI := fMsg.APIRI
|
||||
if approvedByURI == nil {
|
||||
return gtserror.New("approvedByURI was nil")
|
||||
}
|
||||
|
||||
// Assume we're accepting a status; create a
|
||||
// barebones status for dereferencing purposes.
|
||||
bareStatus := >smodel.Status{
|
||||
URI: objectIRI.String(),
|
||||
ApprovedByURI: acceptIRI.String(),
|
||||
ApprovedByURI: approvedByURI.String(),
|
||||
}
|
||||
|
||||
// Call RefreshStatus() to process the provided
|
||||
|
|
@ -872,7 +872,7 @@ func (p *fediAPI) AcceptRemoteStatus(ctx context.Context, fMsg *messages.FromFed
|
|||
}
|
||||
|
||||
// No error means it was indeed a remote status, and the
|
||||
// given acceptIRI permitted it. Timeline and notify it.
|
||||
// given approvedByURI permitted it. Timeline and notify it.
|
||||
if err := p.surface.timelineAndNotifyStatus(ctx, status); err != nil {
|
||||
log.Errorf(ctx, "error timelining and notifying status: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue