GoToSocial/internal/util
Daenney 2cac5a4613
[feature] Support Actor URIs for webfinger queries (#2187)
* [feature] Support Actor URIs for webfinger queries

It's now possible to pass an Actor URI as the resource to query for when
doing a webfinger query. The code now extracts the username and domain
from the URI. The URI needs to be fully qualified, including having a
scheme of http or https to be recognised as such.

The acct scheme is handled as we used to, including dealing with an
erroneous leading @ on the username. We retain the ability to handle
resources without a scheme by parsing them again with the acct scheme if
the original parse failed. This can happen due to parsing ambiguities
when dealing with a string like user@domain.tld:port.

* [bugfix] Remove debugging changes

* [chore] Make TestExtractNamestring table-driven

* [chore] Unnest Trim and Split for readability
2023-09-11 18:38:31 +02:00
..
emoji.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
namestring_test.go [feature] Support Actor URIs for webfinger queries (#2187) 2023-09-11 18:38:31 +02:00
namestring.go [feature] Support Actor URIs for webfinger queries (#2187) 2023-09-11 18:38:31 +02:00
paging_test.go [chore] update account statuses paging logic (#1814) 2023-05-22 16:32:36 +02:00
paging.go [chore] update account statuses paging logic (#1814) 2023-05-22 16:32:36 +02:00
ptr.go [chore] Use generic pointer function (#2080) 2023-08-07 18:38:11 +01:00
punycode.go [bugfix] Punycode fixes (#1743) 2023-05-07 18:53:21 +01:00
statustools.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
time_test.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
time.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
unique.go [chore] Refactor AP authentication, other small bits of tidying up (#1874) 2023-06-13 15:47:56 +01:00