From 42602351c7d975dd0585f605d8daf795ac220cce Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 22 Jan 2022 18:54:12 -0700 Subject: [PATCH] Update StatusTransformer, add emoji entities --- app/Transformer/Api/StatusTransformer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Transformer/Api/StatusTransformer.php b/app/Transformer/Api/StatusTransformer.php index 1ac8a700b..13d62b473 100644 --- a/app/Transformer/Api/StatusTransformer.php +++ b/app/Transformer/Api/StatusTransformer.php @@ -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(),