Update mastodon api transformers, fix timestamps

pull/1721/head
Daniel Supernault
parent be7eae8494
commit 5ff4ba0807
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -19,7 +19,7 @@ class AccountTransformer extends Fractal\TransformerAbstract
'acct' => $acct,
'display_name' => $profile->name,
'locked' => (bool) $profile->is_private,
'created_at' => $profile->created_at->format('c'),
'created_at' => $profile->created_at->toIso8601ZuluString(),
'followers_count' => $profile->followerCount(),
'following_count' => $profile->followingCount(),
'statuses_count' => (int) $profile->statusCount(),

@ -25,7 +25,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
'in_reply_to_account_id' => $status->in_reply_to_profile_id,
'reblog' => null,
'content' => $status->rendered ?? $status->caption,
'created_at' => $status->created_at->format('c'),
'created_at' => $status->created_at->toIso8601ZuluString(),
'emojis' => [],
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(),

Loading…
Cancel
Save