From cb8688f4298a1a3ed5e28565004588be3c071df0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 20 Dec 2021 15:19:53 +0100 Subject: Remove unnecessary storage config variables (#344) * rewire config to not use extraneous serve vars * rename 'file' to 'local' for consistency * use Type and Size again --- internal/processing/federation/getuser.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/processing/federation/getuser.go') diff --git a/internal/processing/federation/getuser.go b/internal/processing/federation/getuser.go index bde3d58de..9f2201c1c 100644 --- a/internal/processing/federation/getuser.go +++ b/internal/processing/federation/getuser.go @@ -27,7 +27,7 @@ import ( "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/activity/streams/vocab" "github.com/superseriousbusiness/gotosocial/internal/gtserror" - "github.com/superseriousbusiness/gotosocial/internal/util" + "github.com/superseriousbusiness/gotosocial/internal/uris" ) func (p *processor) GetUser(ctx context.Context, requestedUsername string, requestURL *url.URL) (interface{}, gtserror.WithCode) { @@ -39,13 +39,13 @@ func (p *processor) GetUser(ctx context.Context, requestedUsername string, reque var requestedPerson vocab.ActivityStreamsPerson switch { - case util.IsPublicKeyPath(requestURL): + case uris.IsPublicKeyPath(requestURL): // if it's a public key path, we don't need to authenticate but we'll only serve the bare minimum user profile needed for the public key requestedPerson, err = p.tc.AccountToASMinimal(ctx, requestedAccount) if err != nil { return nil, gtserror.NewErrorInternalError(err) } - case util.IsUserPath(requestURL): + case uris.IsUserPath(requestURL): // if it's a user path, we want to fully authenticate the request before we serve any data, and then we can serve a more complete profile requestingAccountURI, authenticated, err := p.federator.AuthenticateFederatedRequest(ctx, requestedUsername) if err != nil || !authenticated { -- cgit v1.2.3