mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 03:42:26 -06:00
rework media processing a little bit (#191)
* rework media processing a little bit * review changes
This commit is contained in:
parent
ff05046df7
commit
2b14b20802
13 changed files with 486 additions and 166 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue