mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +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 [
|
||||
'id' => (string) $status->id,
|
||||
'uri' => $status->url(),
|
||||
'url' => $status->url(),
|
||||
'created_at' => $status->created_at->toJSON(),
|
||||
'in_reply_to_id' => $status->in_reply_to_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,
|
||||
'spoiler_text' => $status->cw_summary ?? '',
|
||||
'visibility' => $status->visibility ?? $status->scope,
|
||||
'mentions' => [],
|
||||
'tags' => [],
|
||||
'card' => null,
|
||||
'poll' => null,
|
||||
'language' => 'en',
|
||||
'uri' => $status->url(),
|
||||
'url' => $status->url(),
|
||||
'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' => [
|
||||
'name' => 'web',
|
||||
'website' => null
|
||||
],
|
||||
'language' => null,
|
||||
'pinned' => null,
|
||||
'mentions' => [],
|
||||
'tags' => [],
|
||||
'emojis' => [],
|
||||
'card' => null,
|
||||
'poll' => null,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue