mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 00:35:59 +00:00
Update StatusTransformer
This commit is contained in:
parent
bedb42baca
commit
ab980aee89
1 changed files with 6 additions and 4 deletions
|
@ -23,7 +23,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
'url' => $status->url(),
|
'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' => $status->reblog_of_id || $status->in_reply_to_id ? $this->transform($status->parent()) : null,
|
'reblog' => null,
|
||||||
'content' => $status->rendered ?? $status->caption,
|
'content' => $status->rendered ?? $status->caption,
|
||||||
'created_at' => $status->created_at->format('c'),
|
'created_at' => $status->created_at->format('c'),
|
||||||
'emojis' => [],
|
'emojis' => [],
|
||||||
|
@ -42,9 +42,11 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
'language' => null,
|
'language' => null,
|
||||||
'pinned' => null,
|
'pinned' => null,
|
||||||
|
|
||||||
'pf_type' => $status->type ?? $status->setType(),
|
'pf_type' => $status->type ?? $status->setType(),
|
||||||
'reply_count' => $status->reply_count,
|
'reply_count' => (int) $status->reply_count,
|
||||||
'comments_disabled' => $status->comments_disabled ? true : false
|
'comments_disabled' => $status->comments_disabled ? true : false,
|
||||||
|
'thread' => false,
|
||||||
|
'replies' => []
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue