Update mastodon api transformers, fix timestamps

pull/1721/head
Daniel Supernault 2019-09-26 20:15:49 -06:00
rodzic be7eae8494
commit 5ff4ba0807
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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(),

Wyświetl plik

@ -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(),