mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 03:56:16 -06:00
make higherPrios a simple slice
This commit is contained in:
parent
7233c4d768
commit
480ce48a3e
2 changed files with 8 additions and 19 deletions
|
|
@ -322,11 +322,6 @@ func (p *Processor) DomainPermissionSubscriptionTest(
|
|||
},
|
||||
)
|
||||
|
||||
// Everything *before* the targeted subscription has a higher priority.
|
||||
getHigherPrios := func() ([]*gtsmodel.DomainPermissionSubscription, error) {
|
||||
return permSubs[:index], nil
|
||||
}
|
||||
|
||||
// Get a transport for calling permSub.URI.
|
||||
tsport, err := p.transport.NewTransportForUsername(ctx, acct.Username)
|
||||
if err != nil {
|
||||
|
|
@ -334,6 +329,10 @@ func (p *Processor) DomainPermissionSubscriptionTest(
|
|||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
||||
// Everything *before* the targeted
|
||||
// subscription has a higher priority.
|
||||
higherPrios := permSubs[:index]
|
||||
|
||||
// Call the permSub.URI and parse a list of perms from it.
|
||||
// Any error returned here is a "real" one, not an error
|
||||
// from fetching / parsing the list.
|
||||
|
|
@ -341,7 +340,7 @@ func (p *Processor) DomainPermissionSubscriptionTest(
|
|||
ctx,
|
||||
permSub,
|
||||
tsport,
|
||||
getHigherPrios,
|
||||
higherPrios,
|
||||
true, // Dry run.
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue