tests are passing, but there's still much to be done

This commit is contained in:
tsmethurst 2022-01-09 18:41:22 +01:00
commit dccf21dd87
18 changed files with 259 additions and 170 deletions

View file

@ -26,7 +26,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/media"
)
func (d *deref) GetRemoteMedia(ctx context.Context, requestingUsername string, accountID string, remoteURL string) (*media.Media, error) {
func (d *deref) GetRemoteMedia(ctx context.Context, requestingUsername string, accountID string, remoteURL string, ai *media.AdditionalInfo) (*media.Media, error) {
if accountID == "" {
return nil, fmt.Errorf("RefreshAttachment: minAttachment account ID was empty")
}
@ -46,7 +46,7 @@ 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, remoteURL)
m, err := d.mediaManager.ProcessMedia(ctx, data, accountID, ai)
if err != nil {
return nil, fmt.Errorf("RefreshAttachment: error processing attachment: %s", err)
}