mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 14:40:46 +00:00
Update v1 Api StatusTransformer
This commit is contained in:
parent
b6f56c2751
commit
cdb6385298
1 changed files with 19 additions and 18 deletions
|
@ -19,33 +19,34 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => (string) $status->id,
|
'id' => (string) $status->id,
|
||||||
'uri' => $status->url(),
|
'created_at' => $status->created_at->toJSON(),
|
||||||
'url' => $status->url(),
|
|
||||||
'in_reply_to_id' => $status->in_reply_to_id,
|
'in_reply_to_id' => $status->in_reply_to_id,
|
||||||
'in_reply_to_account_id' => $status->in_reply_to_profile_id,
|
'in_reply_to_account_id' => $status->in_reply_to_profile_id,
|
||||||
'reblog' => null,
|
|
||||||
'content' => $status->rendered ?? $status->caption ?? '',
|
|
||||||
'created_at' => $status->created_at->toJSON(),
|
|
||||||
'emojis' => [],
|
|
||||||
'replies_count' => 0,
|
|
||||||
'reblogs_count' => $status->reblogs_count ?? 0,
|
|
||||||
'favourites_count' => $status->likes_count ?? 0,
|
|
||||||
'reblogged' => null,
|
|
||||||
'favourited' => null,
|
|
||||||
'muted' => null,
|
|
||||||
'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' => [],
|
'language' => 'en',
|
||||||
'tags' => [],
|
'uri' => $status->url(),
|
||||||
'card' => null,
|
'url' => $status->url(),
|
||||||
'poll' => null,
|
'replies_count' => 0,
|
||||||
|
'reblogs_count' => $status->reblogs_count ?? 0,
|
||||||
|
'favourites_count' => $status->likes_count ?? 0,
|
||||||
|
'favourited' => false,
|
||||||
|
'reblogged' => false,
|
||||||
|
'muted' => false,
|
||||||
|
'bookmarked' => false,
|
||||||
|
'pinned' => false,
|
||||||
|
'content' => $status->rendered ?? $status->caption ?? '',
|
||||||
|
'reblog' => null,
|
||||||
'application' => [
|
'application' => [
|
||||||
'name' => 'web',
|
'name' => 'web',
|
||||||
'website' => null
|
'website' => null
|
||||||
],
|
],
|
||||||
'language' => null,
|
'mentions' => [],
|
||||||
'pinned' => null,
|
'tags' => [],
|
||||||
|
'emojis' => [],
|
||||||
|
'card' => null,
|
||||||
|
'poll' => null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue