1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Update StatusTransformer, add emoji entities

This commit is contained in:
Daniel Supernault 2022-01-22 18:54:12 -07:00
parent 1e00c431a8
commit 42602351c7
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -16,6 +16,7 @@ use App\Services\StatusMentionService;
use App\Services\ProfileService;
use Illuminate\Support\Str;
use App\Services\PollService;
use App\Models\CustomEmoji;
class StatusTransformer extends Fractal\TransformerAbstract
{
@ -36,7 +37,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
'content' => $status->rendered ?? $status->caption,
'content_text' => $status->caption,
'created_at' => $status->created_at->format('c'),
'emojis' => [],
'emojis' => CustomEmoji::scan($status->caption),
'reblogs_count' => 0,
'favourites_count' => $status->likes_count ?? 0,
'reblogged' => $status->shared(),