tidy up some federation stuff

This commit is contained in:
tsmethurst 2021-04-28 21:46:13 +02:00
commit 211c43073f
11 changed files with 199 additions and 86 deletions

View file

@ -64,6 +64,10 @@ var (
// inboxPathRegex parses a path that validates and captures the username part from eg /users/example_username/inbox
inboxPathRegex = regexp.MustCompile(inboxPathRegexString)
outboxPathRegexString = fmt.Sprintf(`^/?%s/(%s)/%s$`, UsersPath, usernameRegexString, OutboxPath)
// outboxPathRegex parses a path that validates and captures the username part from eg /users/example_username/outbox
outboxPathRegex = regexp.MustCompile(outboxPathRegexString)
actorPathRegexString = fmt.Sprintf(`^?/%s/(%s)$`, ActorsPath, usernameRegexString)
// actorPathRegex parses a path that validates and captures the username part from eg /actors/example_username
actorPathRegex = regexp.MustCompile(actorPathRegexString)