diff options
Diffstat (limited to 'internal/processing')
-rw-r--r-- | internal/processing/account/account_test.go | 2 | ||||
-rw-r--r-- | internal/processing/account/update.go | 4 | ||||
-rw-r--r-- | internal/processing/media/create.go | 2 | ||||
-rw-r--r-- | internal/processing/processor_test.go | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/internal/processing/account/account_test.go b/internal/processing/account/account_test.go index 9c7f0fe67..5a9382ed6 100644 --- a/internal/processing/account/account_test.go +++ b/internal/processing/account/account_test.go @@ -85,7 +85,7 @@ func (suite *AccountStandardTestSuite) SetupTest() { suite.fromClientAPIChan = make(chan messages.FromClientAPI, 100) suite.httpClient = testrig.NewMockHTTPClient(nil) suite.transportController = testrig.NewTestTransportController(suite.httpClient, suite.db) - suite.federator = testrig.NewTestFederator(suite.db, suite.transportController, suite.storage) + suite.federator = testrig.NewTestFederator(suite.db, suite.transportController, suite.storage, suite.mediaManager) suite.sentEmails = make(map[string]string) suite.emailSender = testrig.NewEmailSender("../../../web/template/", suite.sentEmails) suite.accountProcessor = account.New(suite.db, suite.tc, suite.mediaManager, suite.oauthServer, suite.fromClientAPIChan, suite.federator) diff --git a/internal/processing/account/update.go b/internal/processing/account/update.go index e0dd493e1..6d15b5afb 100644 --- a/internal/processing/account/update.go +++ b/internal/processing/account/update.go @@ -172,7 +172,7 @@ func (p *processor) UpdateAvatar(ctx context.Context, avatar *multipart.FileHead return nil, fmt.Errorf("UpdateAvatar: error processing avatar: %s", err) } - return processingMedia.LoadAttachment(ctx) + return processingMedia.Load(ctx) } // UpdateHeader does the dirty work of checking the header part of an account update form, @@ -214,7 +214,7 @@ func (p *processor) UpdateHeader(ctx context.Context, header *multipart.FileHead return nil, fmt.Errorf("UpdateHeader: error processing header: %s", err) } - return processingMedia.LoadAttachment(ctx) + return processingMedia.Load(ctx) } func (p *processor) processNote(ctx context.Context, note string, accountID string) (string, error) { diff --git a/internal/processing/media/create.go b/internal/processing/media/create.go index 093a3d2be..9df5c7c1f 100644 --- a/internal/processing/media/create.go +++ b/internal/processing/media/create.go @@ -60,7 +60,7 @@ func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form return nil, err } - attachment, err := media.LoadAttachment(ctx) + attachment, err := media.Load(ctx) if err != nil { return nil, err } diff --git a/internal/processing/processor_test.go b/internal/processing/processor_test.go index 04793898f..851d3d5fb 100644 --- a/internal/processing/processor_test.go +++ b/internal/processing/processor_test.go @@ -47,11 +47,11 @@ type ProcessingStandardTestSuite struct { suite.Suite db db.DB storage *kv.KVStore + mediaManager media.Manager typeconverter typeutils.TypeConverter transportController transport.Controller federator federation.Federator oauthServer oauth.Server - mediaManager media.Manager timelineManager timeline.Manager emailSender email.Sender @@ -216,9 +216,9 @@ func (suite *ProcessingStandardTestSuite) SetupTest() { }) suite.transportController = testrig.NewTestTransportController(httpClient, suite.db) - suite.federator = testrig.NewTestFederator(suite.db, suite.transportController, suite.storage) - suite.oauthServer = testrig.NewTestOauthServer(suite.db) suite.mediaManager = testrig.NewTestMediaManager(suite.db, suite.storage) + suite.federator = testrig.NewTestFederator(suite.db, suite.transportController, suite.storage, suite.mediaManager) + suite.oauthServer = testrig.NewTestOauthServer(suite.db) suite.timelineManager = testrig.NewTestTimelineManager(suite.db) suite.emailSender = testrig.NewEmailSender("../../web/template/", nil) |