Make webfinger find actors for queries on actor URIs and URLs. #1477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Make webfinger queries on actor URIs and URLs (which are returned as aliases on typical actor webfinger responses) return the corresponding actor. This matches existing functionality on Mastodon and Pleroma and Misskey.
This should not change behavior of any existing queries or behavior, (tests were ran to make sure) just adds additional valid behavior for certain types of queries. However if a URL is passed that does not match a URI or URL regex, a new, distinct error message will be returned. But I didn't find any tests relying on this behavior.
The changes were tested against the local test harness server, but not a live server just FYI.
closes #1415
Checklist
Please put an x inside each checkbox to indicate that you've read and followed it:
[ ]
->[x]
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
go fmt ./...
andgolangci-lint run
.I go fmt'ed my changes, but after some effort I failed to figure out how to do "golangci-lint run", I'm sorry.