diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index eb1721483..885300d9b 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -27,6 +27,7 @@ use App\Transformer\Api\{ }; use App\Services\{ AccountService, + BookmarkService, FollowerService, LikeService, PublicTimelineService, @@ -327,6 +328,7 @@ class PublicApiController extends Controller return false; } $status['favourited'] = (bool) LikeService::liked($user->profile_id, $s->id); + $status['bookmarked'] = (bool) BookmarkService::get($user->profile_id, $s->id); return $status; }) ->filter(function($s) use($filtered) { @@ -369,6 +371,7 @@ class PublicApiController extends Controller return false; } $status['favourited'] = (bool) LikeService::liked($user->profile_id, $s->id); + $status['bookmarked'] = (bool) BookmarkService::get($user->profile_id, $s->id); return $status; }) ->filter(function($s) use($filtered) { @@ -398,6 +401,8 @@ class PublicApiController extends Controller $status = StatusService::get($k); if($user) { $status['favourited'] = (bool) LikeService::liked($user->profile_id, $k); + $status['bookmarked'] = (bool) BookmarkService::get($user->profile_id, $k); + $status['relationship'] = RelationshipService::get($user->profile_id, $status['account']['id']); } return $status;