1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Update StatusTransformer

This commit is contained in:
Daniel Supernault 2019-04-17 19:46:05 -06:00
parent bedb42baca
commit ab980aee89
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -23,7 +23,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
'url' => $status->url(),
'in_reply_to_id' => $status->in_reply_to_id,
'in_reply_to_account_id' => $status->in_reply_to_profile_id,
'reblog' => $status->reblog_of_id || $status->in_reply_to_id ? $this->transform($status->parent()) : null,
'reblog' => null,
'content' => $status->rendered ?? $status->caption,
'created_at' => $status->created_at->format('c'),
'emojis' => [],
@ -43,8 +43,10 @@ class StatusTransformer extends Fractal\TransformerAbstract
'pinned' => null,
'pf_type' => $status->type ?? $status->setType(),
'reply_count' => $status->reply_count,
'comments_disabled' => $status->comments_disabled ? true : false
'reply_count' => (int) $status->reply_count,
'comments_disabled' => $status->comments_disabled ? true : false,
'thread' => false,
'replies' => []
];
}