|
@@ -12,6 +12,7 @@ use App\Services\MediaService;
|
|
use App\Services\MediaTagService;
|
|
use App\Services\MediaTagService;
|
|
use App\Services\StatusHashtagService;
|
|
use App\Services\StatusHashtagService;
|
|
use App\Services\StatusLabelService;
|
|
use App\Services\StatusLabelService;
|
|
|
|
+use App\Services\StatusMentionService;
|
|
use App\Services\ProfileService;
|
|
use App\Services\ProfileService;
|
|
use Illuminate\Support\Str;
|
|
use Illuminate\Support\Str;
|
|
use App\Services\PollService;
|
|
use App\Services\PollService;
|
|
@@ -37,7 +38,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|
'created_at' => $status->created_at->format('c'),
|
|
'created_at' => $status->created_at->format('c'),
|
|
'emojis' => [],
|
|
'emojis' => [],
|
|
'reblogs_count' => 0,
|
|
'reblogs_count' => 0,
|
|
- 'favourites_count' => 0,
|
|
|
|
|
|
+ 'favourites_count' => $status->likes_count ?? 0,
|
|
'reblogged' => $status->shared(),
|
|
'reblogged' => $status->shared(),
|
|
'favourited' => $status->liked(),
|
|
'favourited' => $status->liked(),
|
|
'muted' => null,
|
|
'muted' => null,
|
|
@@ -50,7 +51,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|
],
|
|
],
|
|
'language' => null,
|
|
'language' => null,
|
|
'pinned' => null,
|
|
'pinned' => null,
|
|
- 'mentions' => [],
|
|
|
|
|
|
+ 'mentions' => StatusMentionService::get($status->id),
|
|
'tags' => [],
|
|
'tags' => [],
|
|
'pf_type' => $status->type ?? $status->setType(),
|
|
'pf_type' => $status->type ?? $status->setType(),
|
|
'reply_count' => (int) $status->reply_count,
|
|
'reply_count' => (int) $status->reply_count,
|