diff options
Diffstat (limited to 'internal/processing/federation/getoutbox.go')
-rw-r--r-- | internal/processing/federation/getoutbox.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/processing/federation/getoutbox.go b/internal/processing/federation/getoutbox.go index 2c7511e45..455f427f3 100644 --- a/internal/processing/federation/getoutbox.go +++ b/internal/processing/federation/getoutbox.go @@ -20,7 +20,6 @@ package federation import ( "context" - "errors" "fmt" "net/url" @@ -37,9 +36,9 @@ func (p *processor) GetOutbox(ctx context.Context, requestedUsername string, pag } // authenticate the request - requestingAccountURI, authenticated, err := p.federator.AuthenticateFederatedRequest(ctx, requestedUsername) - if err != nil || !authenticated { - return nil, gtserror.NewErrorNotAuthorized(errors.New("not authorized"), "not authorized") + requestingAccountURI, errWithCode := p.federator.AuthenticateFederatedRequest(ctx, requestedUsername) + if errWithCode != nil { + return nil, errWithCode } requestingAccount, err := p.federator.GetRemoteAccount(ctx, requestedUsername, requestingAccountURI, false, false) |