mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 09:43:16 +00:00
Update Api StatusTransformer
This commit is contained in:
parent
f98c7caff6
commit
5204aa2c1c
1 changed files with 3 additions and 3 deletions
|
@ -27,8 +27,8 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
'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' => [],
|
||||||
'reblogs_count' => $status->shares()->count(),
|
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
|
||||||
'favourites_count' => $status->likes()->count(),
|
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(),
|
||||||
'reblogged' => $status->shared(),
|
'reblogged' => $status->shared(),
|
||||||
'favourited' => $status->liked(),
|
'favourited' => $status->liked(),
|
||||||
'muted' => null,
|
'muted' => null,
|
||||||
|
@ -47,7 +47,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
||||||
'comments_disabled' => $status->comments_disabled ? true : false,
|
'comments_disabled' => $status->comments_disabled ? true : false,
|
||||||
'thread' => false,
|
'thread' => false,
|
||||||
'replies' => [],
|
'replies' => [],
|
||||||
'parent' => $status->parent() ? $this->transform($status->parent()) : [],
|
'parent' => [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue