summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/finger.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/dereferencing/finger.go')
-rw-r--r--internal/federation/dereferencing/finger.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/internal/federation/dereferencing/finger.go b/internal/federation/dereferencing/finger.go
index 03eecf1bb..6950157f1 100644
--- a/internal/federation/dereferencing/finger.go
+++ b/internal/federation/dereferencing/finger.go
@@ -27,17 +27,12 @@ import (
"strings"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
+ "github.com/superseriousbusiness/gotosocial/internal/transport"
"github.com/superseriousbusiness/gotosocial/internal/util"
)
-func (d *deref) fingerRemoteAccount(ctx context.Context, username string, targetUsername string, targetHost string) (accountDomain string, accountURI *url.URL, err error) {
- t, err := d.transportController.NewTransportForUsername(ctx, username)
- if err != nil {
- err = fmt.Errorf("fingerRemoteAccount: error getting transport for %s: %s", username, err)
- return
- }
-
- b, err := t.Finger(ctx, targetUsername, targetHost)
+func (d *deref) fingerRemoteAccount(ctx context.Context, transport transport.Transport, targetUsername string, targetHost string) (accountDomain string, accountURI *url.URL, err error) {
+ b, err := transport.Finger(ctx, targetUsername, targetHost)
if err != nil {
err = fmt.Errorf("fingerRemoteAccount: error fingering @%s@%s: %s", targetUsername, targetHost, err)
return