From 58b331d22e2f91b5bd5b48e4d09854531beacdae Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 4 Oct 2022 23:18:25 -0600 Subject: [PATCH] Update ApiV1Controller, include self likes in favourited_by endpoint --- app/Http/Controllers/Api/ApiV1Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 8eb1f43e4..ae1457618 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -2449,12 +2449,12 @@ class ApiV1Controller extends Controller ->limit($limit) ->get() ->map(function($like) { - $account = AccountService::getMastodon($like->profile_id); + $account = AccountService::getMastodon($like->profile_id, true); $account['follows'] = isset($like->created_at); return $account; }) ->filter(function($account) use($user) { - return $account && isset($account['id']) && $account['id'] != $user->profile_id; + return $account && isset($account['id']); }) ->values();