From 80bcce22a2368c3911137dec97d6744dee328809 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Fri, 25 Jun 2021 14:55:18 -0700 Subject: more cleaning up to better intergrate with plemroma standards. can verify signatures better --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 44e7ea3..4d23a8d 100644 --- a/main.go +++ b/main.go @@ -2293,8 +2293,6 @@ func FingerRequest(actor string, instance string) (*http.Response){ CheckError(err, "could not get finger request from id req") - req.Header.Set("Accept", activitystreams) - resp, err := http.DefaultClient.Do(req) var finger Webfinger @@ -2342,12 +2340,16 @@ func GetActorInstance(path string) (string, string) { } } - re = regexp.MustCompile(`(https?:\\)?(www)?([\w\d-_.:]+)\/([\w\d-_.]+)`) + re = regexp.MustCompile(`(https?:\\)?(www)?([\w\d-_.:]+)\/([\w\d-_.]+)(\/([\w\d-_.]+))?`) httpFormat := re.MatchString(path) if(httpFormat) { match := re.FindStringSubmatch(path) if(len(match) > 3) { + if match[4] == "users" { + return match[6], match[3] + } + return match[4], match[3] } } -- cgit v1.2.3