diff options
Diffstat (limited to 'internal/federation')
-rw-r--r-- | internal/federation/dereferencing/account.go | 6 | ||||
-rw-r--r-- | internal/federation/dereferencing/dereferencer.go | 2 | ||||
-rw-r--r-- | internal/federation/dereferencing/media.go | 6 | ||||
-rw-r--r-- | internal/federation/dereferencing/media_test.go | 4 | ||||
-rw-r--r-- | internal/federation/dereferencing/status.go | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/internal/federation/dereferencing/account.go b/internal/federation/dereferencing/account.go index d83fc3bac..27d9f39ce 100644 --- a/internal/federation/dereferencing/account.go +++ b/internal/federation/dereferencing/account.go @@ -119,7 +119,7 @@ func (d *deref) GetRemoteAccount(ctx context.Context, username string, remoteAcc } else { // take the id we already have and do an update gtsAccount.ID = maybeAccount.ID - +aaaaaaaaaaaaaaaaaa if err := d.PopulateAccountFields(ctx, gtsAccount, username, refresh); err != nil { return nil, new, fmt.Errorf("FullyDereferenceAccount: error populating further account fields: %s", err) } @@ -260,7 +260,7 @@ func (d *deref) fetchHeaderAndAviForAccount(ctx context.Context, targetAccount * avatar := true processingMedia, err := d.mediaManager.ProcessMedia(ctx, data, targetAccount.ID, &media.AdditionalInfo{ RemoteURL: &targetAccount.AvatarRemoteURL, - Avatar: &avatar, + Avatar: &avatar, }) if err != nil { return err @@ -283,7 +283,7 @@ func (d *deref) fetchHeaderAndAviForAccount(ctx context.Context, targetAccount * header := true processingMedia, err := d.mediaManager.ProcessMedia(ctx, data, targetAccount.ID, &media.AdditionalInfo{ RemoteURL: &targetAccount.HeaderRemoteURL, - Header: &header, + Header: &header, }) if err != nil { return err diff --git a/internal/federation/dereferencing/dereferencer.go b/internal/federation/dereferencing/dereferencer.go index 787a39739..1e6f781b8 100644 --- a/internal/federation/dereferencing/dereferencer.go +++ b/internal/federation/dereferencing/dereferencer.go @@ -41,7 +41,7 @@ type Dereferencer interface { GetRemoteInstance(ctx context.Context, username string, remoteInstanceURI *url.URL) (*gtsmodel.Instance, error) - GetRemoteMedia(ctx context.Context, requestingUsername string, accountID string, remoteURL string, ai *media.AdditionalInfo) (*media.Media, error) + GetRemoteMedia(ctx context.Context, requestingUsername string, accountID string, remoteURL string, ai *media.AdditionalInfo) (*media.Processing, error) DereferenceAnnounce(ctx context.Context, announce *gtsmodel.Status, requestingUsername string) error DereferenceThread(ctx context.Context, username string, statusIRI *url.URL) error diff --git a/internal/federation/dereferencing/media.go b/internal/federation/dereferencing/media.go index 0ddab7ae0..f02303aa1 100644 --- a/internal/federation/dereferencing/media.go +++ b/internal/federation/dereferencing/media.go @@ -26,7 +26,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/media" ) -func (d *deref) GetRemoteMedia(ctx context.Context, requestingUsername string, accountID string, remoteURL string, ai *media.AdditionalInfo) (*media.Media, error) { +func (d *deref) GetRemoteMedia(ctx context.Context, requestingUsername string, accountID string, remoteURL string, ai *media.AdditionalInfo) (*media.Processing, error) { if accountID == "" { return nil, fmt.Errorf("RefreshAttachment: minAttachment account ID was empty") } @@ -46,10 +46,10 @@ func (d *deref) GetRemoteMedia(ctx context.Context, requestingUsername string, a return nil, fmt.Errorf("RefreshAttachment: error dereferencing media: %s", err) } - m, err := d.mediaManager.ProcessMedia(ctx, data, accountID, ai) + processingMedia, err := d.mediaManager.ProcessMedia(ctx, data, accountID, ai) if err != nil { return nil, fmt.Errorf("RefreshAttachment: error processing attachment: %s", err) } - return m, nil + return processingMedia, nil } diff --git a/internal/federation/dereferencing/media_test.go b/internal/federation/dereferencing/media_test.go index 1f076f62c..61ee6edb6 100644 --- a/internal/federation/dereferencing/media_test.go +++ b/internal/federation/dereferencing/media_test.go @@ -52,8 +52,8 @@ func (suite *AttachmentTestSuite) TestDereferenceAttachmentBlocking() { }) suite.NoError(err) - // make a blocking call to load the attachment from the in-process media - attachment, err := media.LoadAttachment(ctx) + // make a blocking call to load the attachment from the in-process media + attachment, err := media.Load(ctx) suite.NoError(err) suite.NotNil(attachment) diff --git a/internal/federation/dereferencing/status.go b/internal/federation/dereferencing/status.go index 47ce087a2..041cfa6b4 100644 --- a/internal/federation/dereferencing/status.go +++ b/internal/federation/dereferencing/status.go @@ -406,7 +406,7 @@ func (d *deref) populateStatusAttachments(ctx context.Context, status *gtsmodel. continue } - attachment, err := media.LoadAttachment(ctx) + attachment, err := media.Load(ctx) if err != nil { logrus.Errorf("populateStatusAttachments: couldn't load remote attachment %s: %s", a.RemoteURL, err) continue |