mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update StatusTransformer
This commit is contained in:
parent
abcc62a3fc
commit
2532663295
1 changed files with 5 additions and 4 deletions
|
@ -27,6 +27,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
'content' => $status->rendered ?? $status->caption,
|
||||
'created_at' => $status->created_at->toIso8601ZuluString(),
|
||||
'emojis' => [],
|
||||
'replies_count' => 0,
|
||||
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
|
||||
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(),
|
||||
'reblogged' => null,
|
||||
|
@ -35,16 +36,16 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
'sensitive' => (bool) $status->is_nsfw,
|
||||
'spoiler_text' => $status->cw_summary ?? '',
|
||||
'visibility' => $status->visibility ?? $status->scope,
|
||||
'mentions' => [],
|
||||
'tags' => [],
|
||||
'card' => null,
|
||||
'poll' => null,
|
||||
'application' => [
|
||||
'name' => 'web',
|
||||
'website' => null
|
||||
],
|
||||
'language' => null,
|
||||
'pinned' => null,
|
||||
'mentions' => [],
|
||||
|
||||
'parent' => [],
|
||||
'place' => $status->place
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue