summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/status.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-08 17:17:01 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-08 17:17:01 +0100
commitf61c3ddcf72ff689b9d253546c58d499b6fe6ac8 (patch)
treeb418d5a833f0e3b92b255e73efa98007eb8127ac /internal/federation/dereferencing/status.go
parentfurther refinements (diff)
downloadgotosocial-f61c3ddcf72ff689b9d253546c58d499b6fe6ac8.tar.xz
compiling now
Diffstat (limited to 'internal/federation/dereferencing/status.go')
-rw-r--r--internal/federation/dereferencing/status.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/federation/dereferencing/status.go b/internal/federation/dereferencing/status.go
index d7de5936a..e184b585f 100644
--- a/internal/federation/dereferencing/status.go
+++ b/internal/federation/dereferencing/status.go
@@ -393,9 +393,15 @@ func (d *deref) populateStatusAttachments(ctx context.Context, status *gtsmodel.
a.AccountID = status.AccountID
a.StatusID = status.ID
- attachment, err := d.GetRemoteAttachment(ctx, requestingUsername, a)
+ media, err := d.GetRemoteMedia(ctx, requestingUsername, a.AccountID, a.RemoteURL)
if err != nil {
- logrus.Errorf("populateStatusAttachments: couldn't get remote attachment %s: %s", a.RemoteURL, err)
+ logrus.Errorf("populateStatusAttachments: couldn't get remote media %s: %s", a.RemoteURL, err)
+ continue
+ }
+
+ attachment, err := media.LoadAttachment(ctx)
+ if err != nil {
+ logrus.Errorf("populateStatusAttachments: couldn't load remote attachment %s: %s", a.RemoteURL, err)
continue
}