summaryrefslogtreecommitdiff
path: root/internal/processing/media
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/media')
-rw-r--r--internal/processing/media/create.go4
-rw-r--r--internal/processing/media/getmedia.go2
-rw-r--r--internal/processing/media/update.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/internal/processing/media/create.go b/internal/processing/media/create.go
index 43162f3f6..0783bfae8 100644
--- a/internal/processing/media/create.go
+++ b/internal/processing/media/create.go
@@ -73,7 +73,7 @@ func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form
// prepare the frontend representation now -- if there are any errors here at least we can bail without
// having already put something in the database and then having to clean it up again (eugh)
- mastoAttachment, err := p.tc.AttachmentToMasto(ctx, attachment)
+ apiAttachment, err := p.tc.AttachmentToAPIAttachment(ctx, attachment)
if err != nil {
return nil, fmt.Errorf("error parsing media attachment to frontend type: %s", err)
}
@@ -83,5 +83,5 @@ func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form
return nil, fmt.Errorf("error storing media attachment in db: %s", err)
}
- return &mastoAttachment, nil
+ return &apiAttachment, nil
}
diff --git a/internal/processing/media/getmedia.go b/internal/processing/media/getmedia.go
index 91608e90d..763aaf8f6 100644
--- a/internal/processing/media/getmedia.go
+++ b/internal/processing/media/getmedia.go
@@ -43,7 +43,7 @@ func (p *processor) GetMedia(ctx context.Context, account *gtsmodel.Account, med
return nil, gtserror.NewErrorNotFound(errors.New("attachment not owned by requesting account"))
}
- a, err := p.tc.AttachmentToMasto(ctx, attachment)
+ a, err := p.tc.AttachmentToAPIAttachment(ctx, attachment)
if err != nil {
return nil, gtserror.NewErrorNotFound(fmt.Errorf("error converting attachment: %s", err))
}
diff --git a/internal/processing/media/update.go b/internal/processing/media/update.go
index e6c78563d..b3455bc91 100644
--- a/internal/processing/media/update.go
+++ b/internal/processing/media/update.go
@@ -63,7 +63,7 @@ func (p *processor) Update(ctx context.Context, account *gtsmodel.Account, media
}
}
- a, err := p.tc.AttachmentToMasto(ctx, attachment)
+ a, err := p.tc.AttachmentToAPIAttachment(ctx, attachment)
if err != nil {
return nil, gtserror.NewErrorNotFound(fmt.Errorf("error converting attachment: %s", err))
}