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,
|
'content' => $status->rendered ?? $status->caption,
|
||||||
'created_at' => $status->created_at->toIso8601ZuluString(),
|
'created_at' => $status->created_at->toIso8601ZuluString(),
|
||||||
'emojis' => [],
|
'emojis' => [],
|
||||||
|
'replies_count' => 0,
|
||||||
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
|
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
|
||||||
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(),
|
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(),
|
||||||
'reblogged' => null,
|
'reblogged' => null,
|
||||||
|
@ -35,16 +36,16 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
'sensitive' => (bool) $status->is_nsfw,
|
'sensitive' => (bool) $status->is_nsfw,
|
||||||
'spoiler_text' => $status->cw_summary ?? '',
|
'spoiler_text' => $status->cw_summary ?? '',
|
||||||
'visibility' => $status->visibility ?? $status->scope,
|
'visibility' => $status->visibility ?? $status->scope,
|
||||||
|
'mentions' => [],
|
||||||
|
'tags' => [],
|
||||||
|
'card' => null,
|
||||||
|
'poll' => null,
|
||||||
'application' => [
|
'application' => [
|
||||||
'name' => 'web',
|
'name' => 'web',
|
||||||
'website' => null
|
'website' => null
|
||||||
],
|
],
|
||||||
'language' => null,
|
'language' => null,
|
||||||
'pinned' => null,
|
'pinned' => null,
|
||||||
'mentions' => [],
|
|
||||||
|
|
||||||
'parent' => [],
|
|
||||||
'place' => $status->place
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue