summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/status.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-04 14:02:01 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-04 14:02:01 +0200
commit2b14b208025e5f7e57f71dcaba6d396081bdc54b (patch)
tree0ace50114ac9ac441b361a92216a57bdc6ae40d7 /internal/federation/dereferencing/status.go
parenttests + announce notification fix (#193) (diff)
downloadgotosocial-2b14b208025e5f7e57f71dcaba6d396081bdc54b.tar.xz
rework media processing a little bit (#191)
* rework media processing a little bit * review changes
Diffstat (limited to 'internal/federation/dereferencing/status.go')
-rw-r--r--internal/federation/dereferencing/status.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/federation/dereferencing/status.go b/internal/federation/dereferencing/status.go
index b8f5bba3b..987285eee 100644
--- a/internal/federation/dereferencing/status.go
+++ b/internal/federation/dereferencing/status.go
@@ -396,13 +396,10 @@ func (d *deref) populateStatusAttachments(ctx context.Context, status *gtsmodel.
attachments := []*gtsmodel.MediaAttachment{}
for _, a := range status.Attachments {
- aURL, err := url.Parse(a.RemoteURL)
- if err != nil {
- l.Errorf("populateStatusAttachments: couldn't parse attachment url %s: %s", a.RemoteURL, err)
- continue
- }
+ a.AccountID = status.AccountID
+ a.StatusID = status.ID
- attachment, err := d.GetRemoteAttachment(ctx, requestingUsername, aURL, status.AccountID, status.ID, a.File.ContentType)
+ attachment, err := d.GetRemoteAttachment(ctx, requestingUsername, a)
if err != nil {
l.Errorf("populateStatusAttachments: couldn't get remote attachment %s: %s", a.RemoteURL, err)
continue