[feature] Use local_only field, deprecate federated field (#3222)

* [feature] Use `local_only` field, deprecate `federated` field

* use `deprecated` comment for form.Federated

* nolint
This commit is contained in:
tobi 2024-08-22 19:47:10 +02:00 committed by GitHub
commit 53fccb8af8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 233 additions and 171 deletions

View file

@ -129,6 +129,18 @@ func (p *Processor) OutboxGet(
hi = statuses[0].ID
}
// Reslice statuses dropping all those invisible to requester
// (eg., local-only statuses, if the requester is remote).
statuses, err = p.visFilter.StatusesVisible(
ctx,
auth.requestingAcct,
statuses,
)
if err != nil {
err := gtserror.Newf("error filtering statuses: %w", err)
return nil, gtserror.NewErrorInternalError(err)
}
// Start building AS collection page params.
params.Total = util.Ptr(*receivingAcct.Stats.StatusesCount)
var pageParams ap.CollectionPageParams