From 58b331d22e2f91b5bd5b48e4d09854531beacdae Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 4 Oct 2022 23:18:25 -0600 Subject: [PATCH 1/2] 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(); From ee51a4552af6e6c65563a7c9876cb9f7352da0ce Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 4 Oct 2022 23:18:44 -0600 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9f060084..f5ca49509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.4...dev) +### Updates +- Update ApiV1Controller, include self likes in favourited_by endpoint ([58b331d2](https://github.com/pixelfed/pixelfed/commit/58b331d2)) +- ([](https://github.com/pixelfed/pixelfed/commit/)) + ## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4) ### New Features @@ -94,7 +98,6 @@ - Update CollectionController, limit max title and description length ([6e76cf4b](https://github.com/pixelfed/pixelfed/commit/6e76cf4b)) - Update collection components, fix title/description padding/overflow bug and add title/description limit and input counter ([6e4272a8](https://github.com/pixelfed/pixelfed/commit/6e4272a8)) - Update Media model, fix thumbnail cdn paths ([9888af12](https://github.com/pixelfed/pixelfed/commit/9888af12)) -- ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3)