diff options
author | FChannel <> | 2021-06-25 14:55:18 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-25 14:55:18 -0700 |
commit | 80bcce22a2368c3911137dec97d6744dee328809 (patch) | |
tree | 0030d95bd0cc32562dd4652e93920e86188fcac5 /main.go | |
parent | 3b806e4603a7da8bb6a24029a0115e18a6b7ba5b (diff) |
more cleaning up to better intergrate with plemroma standards. can verify signatures better
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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] } } |