From b315eee43b1e40a10ddf95786e516a4ac459510c Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 20 Sep 2021 16:46:45 +0200 Subject: Update webfingering a little, add tests (#236) * Update webfingering a little, add tests * fix broken tests oops --- internal/processing/federation.go | 2 +- internal/processing/processor.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/processing') diff --git a/internal/processing/federation.go b/internal/processing/federation.go index 352a6ddc2..1fccfa36e 100644 --- a/internal/processing/federation.go +++ b/internal/processing/federation.go @@ -371,7 +371,7 @@ func (p *processor) GetFediStatusReplies(ctx context.Context, requestedUsername return data, nil } -func (p *processor) GetWebfingerAccount(ctx context.Context, requestedUsername string, requestURL *url.URL) (*apimodel.WellKnownResponse, gtserror.WithCode) { +func (p *processor) GetWebfingerAccount(ctx context.Context, requestedUsername string) (*apimodel.WellKnownResponse, gtserror.WithCode) { // get the account the request is referring to requestedAccount, err := p.db.GetLocalAccountByUsername(ctx, requestedUsername) if err != nil { diff --git a/internal/processing/processor.go b/internal/processing/processor.go index bc6e6511b..6f36f6d21 100644 --- a/internal/processing/processor.go +++ b/internal/processing/processor.go @@ -202,7 +202,7 @@ type Processor interface { GetFediStatusReplies(ctx context.Context, requestedUsername string, requestedStatusID string, page bool, onlyOtherAccounts bool, minID string, requestURL *url.URL) (interface{}, gtserror.WithCode) // GetWebfingerAccount handles the GET for a webfinger resource. Most commonly, it will be used for returning account lookups. - GetWebfingerAccount(ctx context.Context, requestedUsername string, requestURL *url.URL) (*apimodel.WellKnownResponse, gtserror.WithCode) + GetWebfingerAccount(ctx context.Context, requestedUsername string) (*apimodel.WellKnownResponse, gtserror.WithCode) // GetNodeInfoRel returns a well known response giving the path to node info. GetNodeInfoRel(ctx context.Context, request *http.Request) (*apimodel.WellKnownResponse, gtserror.WithCode) -- cgit v1.2.3