1
0
Fork 0
forked from mirror/pixelfed

Update StatusStatelessTransformer, cast snowflake ids as strings

This commit is contained in:
Daniel Supernault 2021-08-27 20:37:00 -06:00
parent 6832836c55
commit e1277d4081
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -27,8 +27,8 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
'shortcode' => HashidService::encode($status->id), 'shortcode' => HashidService::encode($status->id),
'uri' => $status->url(), 'uri' => $status->url(),
'url' => $status->url(), 'url' => $status->url(),
'in_reply_to_id' => $status->in_reply_to_id, 'in_reply_to_id' => (string) $status->in_reply_to_id,
'in_reply_to_account_id' => $status->in_reply_to_profile_id, 'in_reply_to_account_id' => (string) $status->in_reply_to_profile_id,
'reblog' => null, 'reblog' => null,
'content' => $status->rendered ?? $status->caption, 'content' => $status->rendered ?? $status->caption,
'content_text' => $status->caption, 'content_text' => $status->caption,