diff options
author | 2022-06-11 11:01:34 +0200 | |
---|---|---|
committer | 2022-06-11 11:01:34 +0200 | |
commit | dfdc473cefa255c5d0fb6c2e90e2b90815305c2f (patch) | |
tree | af3bbc5398ac24acbb2ca1158edfef8517344f8a /internal/federation/federator.go | |
parent | [feature] Add `created_at` and `error_description` to `/oauth/token` endpoint... (diff) | |
download | gotosocial-dfdc473cefa255c5d0fb6c2e90e2b90815305c2f.tar.xz |
[chore] Webfinger rework (#627)
* move finger to dereferencer
* totally break GetRemoteAccount
* start reworking finger func a bit
* start reworking getRemoteAccount a bit
* move mention parts to namestring
* rework webfingerget
* use util function to extract webfinger parts
* use accountDomain
* rework finger again, final form
* just a real nasty commit, the worst
* remove refresh from account
* use new ASRepToAccount signature
* fix incorrect debug call
* fix for new getRemoteAccount
* rework GetRemoteAccount
* start updating tests to remove repetition
* break a lot of tests
Move shared test logic into the testrig,
rather than having it scattered all over
the place. This allows us to just mock
the transport controller once, and have
all tests use it (unless they need not to
for some other reason).
* fix up tests to use main mock httpclient
* webfinger only if necessary
* cheeky linting with the lads
* update mentionName regex
recognize instance accounts
* don't finger instance accounts
* test webfinger part extraction
* increase default worker count to 4 per cpu
* don't repeat regex parsing
* final search for discovered accountDomain
* be more permissive in namestring lookup
* add more extraction tests
* simplify GetParseMentionFunc
* skip long search if local account
* fix broken test
Diffstat (limited to 'internal/federation/federator.go')
-rw-r--r-- | internal/federation/federator.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/federation/federator.go b/internal/federation/federator.go index 6412c9ee1..2f0606338 100644 --- a/internal/federation/federator.go +++ b/internal/federation/federator.go @@ -53,14 +53,10 @@ type Federator interface { // If something goes wrong during authentication, nil, false, and an error will be returned. AuthenticateFederatedRequest(ctx context.Context, username string) (*url.URL, gtserror.WithCode) - // FingerRemoteAccount performs a webfinger lookup for a remote account, using the .well-known path. It will return the ActivityPub URI for that - // account, or an error if it doesn't exist or can't be retrieved. - FingerRemoteAccount(ctx context.Context, requestingUsername string, targetUsername string, targetDomain string) (*url.URL, error) - DereferenceRemoteThread(ctx context.Context, username string, statusURI *url.URL) error DereferenceAnnounce(ctx context.Context, announce *gtsmodel.Status, requestingUsername string) error - GetRemoteAccount(ctx context.Context, username string, remoteAccountID *url.URL, blocking bool, refresh bool) (*gtsmodel.Account, error) + GetRemoteAccount(ctx context.Context, params dereferencing.GetRemoteAccountParams) (*gtsmodel.Account, error) GetRemoteStatus(ctx context.Context, username string, remoteStatusID *url.URL, refetch, includeParent bool) (*gtsmodel.Status, ap.Statusable, error) EnrichRemoteStatus(ctx context.Context, username string, status *gtsmodel.Status, includeParent bool) (*gtsmodel.Status, error) |