Skip to content

Commit

Permalink
Update ap helpers, fix album order bug by setting media order
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Mar 23, 2023
1 parent 00aa5cf commit 871f798
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Util/ActivityPub/Helpers.php
Expand Up @@ -665,7 +665,7 @@ public static function importNoteAttachment($data, Status $status)
$storagePath = MediaPathService::get($user, 2);
$allowed = explode(',', config_cache('pixelfed.media_types'));

foreach($attachments as $media) {
foreach($attachments as $key => $media) {
$type = $media['mediaType'];
$url = $media['url'];
$valid = self::validateUrl($url);
Expand All @@ -685,6 +685,7 @@ public static function importNoteAttachment($data, Status $status)
$media->media_path = $url;
$media->remote_url = $url;
$media->caption = $caption;
$media->order = $key + 1;
if($license) {
$media->license = $license;
}
Expand Down

0 comments on commit 871f798

Please sign in to comment.