summaryrefslogtreecommitdiff
path: root/internal/processing/account
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/account')
-rw-r--r--internal/processing/account/account_test.go5
-rw-r--r--internal/processing/account/get.go9
2 files changed, 9 insertions, 5 deletions
diff --git a/internal/processing/account/account_test.go b/internal/processing/account/account_test.go
index d9ce68cc0..8ea1665ac 100644
--- a/internal/processing/account/account_test.go
+++ b/internal/processing/account/account_test.go
@@ -23,7 +23,6 @@ import (
"codeberg.org/gruf/go-store/kv"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/activity/pub"
"github.com/superseriousbusiness/gotosocial/internal/concurrency"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/email"
@@ -48,7 +47,6 @@ type AccountStandardTestSuite struct {
mediaManager media.Manager
oauthServer oauth.Server
fromClientAPIChan chan messages.FromClientAPI
- httpClient pub.HttpClient
transportController transport.Controller
federator federation.Federator
emailSender email.Sender
@@ -97,8 +95,7 @@ func (suite *AccountStandardTestSuite) SetupTest() {
suite.mediaManager = testrig.NewTestMediaManager(suite.db, suite.storage)
suite.oauthServer = testrig.NewTestOauthServer(suite.db)
suite.fromClientAPIChan = make(chan messages.FromClientAPI, 100)
- suite.httpClient = testrig.NewMockHTTPClient(nil)
- suite.transportController = testrig.NewTestTransportController(suite.httpClient, suite.db, fedWorker)
+ suite.transportController = testrig.NewTestTransportController(testrig.NewMockHTTPClient(nil, "../../../testrig/media"), suite.db, fedWorker)
suite.federator = testrig.NewTestFederator(suite.db, suite.transportController, suite.storage, suite.mediaManager, fedWorker)
suite.sentEmails = make(map[string]string)
suite.emailSender = testrig.NewEmailSender("../../../web/template/", suite.sentEmails)
diff --git a/internal/processing/account/get.go b/internal/processing/account/get.go
index 70c1cd9fe..d6f1aa71f 100644
--- a/internal/processing/account/get.go
+++ b/internal/processing/account/get.go
@@ -26,6 +26,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/db"
+ "github.com/superseriousbusiness/gotosocial/internal/federation/dereferencing"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
@@ -80,7 +81,13 @@ func (p *processor) getAccountFor(ctx context.Context, requestingAccount *gtsmod
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error parsing url %s: %s", targetAccount.URI, err))
}
- a, err := p.federator.GetRemoteAccount(ctx, requestingAccount.Username, targetAccountURI, true, false)
+ a, err := p.federator.GetRemoteAccount(ctx, dereferencing.GetRemoteAccountParams{
+ RequestingUsername: requestingAccount.Username,
+ RemoteAccountID: targetAccountURI,
+ RemoteAccountHost: targetAccount.Domain,
+ RemoteAccountUsername: targetAccount.Username,
+ Blocking: true,
+ })
if err == nil {
targetAccount = a
}