mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Merge pull request #995 from pixelfed/frontend-ui-refactor
Update AP Note transformers to return media attachments in proper order
This commit is contained in:
commit
917010e2e5
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ class CreateNote extends Fractal\TransformerAbstract
|
|||
'to' => $status->scopeToAudience('to'),
|
||||
'cc' => $status->scopeToAudience('cc'),
|
||||
'sensitive' => (bool) $status->is_nsfw,
|
||||
'attachment' => $status->media->map(function ($media) {
|
||||
'attachment' => $status->media()->orderBy('order')->get()->map(function ($media) {
|
||||
return [
|
||||
'type' => $media->activityVerb(),
|
||||
'mediaType' => $media->mime,
|
||||
|
|
|
@ -42,7 +42,7 @@ class Note extends Fractal\TransformerAbstract
|
|||
'to' => $status->scopeToAudience('to'),
|
||||
'cc' => $status->scopeToAudience('cc'),
|
||||
'sensitive' => (bool) $status->is_nsfw,
|
||||
'attachment' => $status->media->map(function ($media) {
|
||||
'attachment' => $status->media()->orderBy('order')->get()->map(function ($media) {
|
||||
return [
|
||||
'type' => $media->activityVerb(),
|
||||
'mediaType' => $media->mime,
|
||||
|
|
Loading…
Reference in a new issue