From dac4b267cab31fb3a4ce301f1bcdf364fcb541a1 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 5 Jun 2022 21:36:17 -0700 Subject: fix finger actor --- activitypub/webfinger.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'activitypub/webfinger.go') diff --git a/activitypub/webfinger.go b/activitypub/webfinger.go index 276a791..8dce506 100644 --- a/activitypub/webfinger.go +++ b/activitypub/webfinger.go @@ -122,20 +122,22 @@ func FingerRequest(actor string, instance string) (*http.Response, error) { if len(finger.Links) > 0 { for _, e := range finger.Links { if e.Type == "application/activity+json" { - req, err := http.NewRequest("GET", e.Href, nil) + req, err = http.NewRequest("GET", e.Href, nil) if err != nil { return resp, util.MakeError(err, "FingerRequest") } - req.Header.Set("Accept", config.ActivityStreams) - resp, _ := util.RouteProxy(req) - - return resp, nil + break } } } + req.Header.Set("Accept", config.ActivityStreams) + if resp, err = util.RouteProxy(req); err != nil { + return resp, util.MakeError(err, "FingerRequest") + } + return resp, nil } -- cgit v1.2.3