mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update mastodon api transformers
This commit is contained in:
parent
5d97fc8776
commit
7243489088
3 changed files with 3 additions and 3 deletions
|
@ -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->toIso8601ZuluString(),
|
||||
'created_at' => $profile->created_at->toJSON(),
|
||||
'followers_count' => $profile->followerCount(),
|
||||
'following_count' => $profile->followingCount(),
|
||||
'statuses_count' => (int) $profile->statusCount(),
|
||||
|
|
|
@ -20,7 +20,7 @@ class NotificationTransformer extends Fractal\TransformerAbstract
|
|||
return [
|
||||
'id' => (string) $notification->id,
|
||||
'type' => $this->replaceTypeVerb($notification->action),
|
||||
'created_at' => (string) $notification->created_at->toIso8601ZuluString(),
|
||||
'created_at' => (string) $notification->created_at->toJSON(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -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->toIso8601ZuluString(),
|
||||
'created_at' => $status->created_at->toJSON(),
|
||||
'emojis' => [],
|
||||
'replies_count' => 0,
|
||||
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
|
||||
|
|
Loading…
Reference in a new issue