diff options
author | FChannel <> | 2022-06-05 21:36:17 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | dac4b267cab31fb3a4ce301f1bcdf364fcb541a1 (patch) | |
tree | 22852a6457e08f3ea047d2c20900db73c26e2fda /activitypub/webfinger.go | |
parent | 3ac22385f2cb2256db718e47f5ae3c6d13353b70 (diff) |
fix finger actor
Diffstat (limited to 'activitypub/webfinger.go')
-rw-r--r-- | activitypub/webfinger.go | 12 |
1 files changed, 7 insertions, 5 deletions
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 } |