From 54a5c3be344d26162eb04b2cf3b0304220ac45ce Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 19 Jul 2022 23:22:31 -0600 Subject: [PATCH 1/2] Fix v1 api block/mute endpoints, refresh RelationshipService cache after relationship changes --- app/Http/Controllers/Api/ApiV1Controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 74a63d87..c9e23269 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -916,6 +916,7 @@ class ApiV1Controller extends Controller Cache::forget("user:filter:list:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $id); $resource = new Fractal\Resource\Item($profile, new RelationshipTransformer()); $res = $this->fractal->createData($resource)->toArray(); @@ -951,6 +952,7 @@ class ApiV1Controller extends Controller Cache::forget("user:filter:list:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $id); $resource = new Fractal\Resource\Item($profile, new RelationshipTransformer()); $res = $this->fractal->createData($resource)->toArray(); @@ -1736,6 +1738,7 @@ class ApiV1Controller extends Controller Cache::forget("user:filter:list:$pid"); Cache::forget("feature:discover:posts:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $id); $resource = new Fractal\Resource\Item($account, new RelationshipTransformer()); $res = $this->fractal->createData($resource)->toArray(); @@ -1769,6 +1772,7 @@ class ApiV1Controller extends Controller Cache::forget("user:filter:list:$pid"); Cache::forget("feature:discover:posts:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $id); } $resource = new Fractal\Resource\Item($account, new RelationshipTransformer()); From 84961a8df675d41d57267363aa63c29acdbb66fe Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 19 Jul 2022 23:24:40 -0600 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27af526e..da733fe1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ - Fix timeline infinite scroll ([03a85460](https://github.com/pixelfed/pixelfed/commit/03a85460)) - Fix remote avatar urls when not using cloud storage ([672f7c8c](https://github.com/pixelfed/pixelfed/commit/672f7c8c)) - Update ResetPasswordController redirectTo path to /i/web as /home is deprecated ([8803c6de](https://github.com/pixelfed/pixelfed/commit/8803c6de)) +- Fix v1 api block/mute endpoints, refresh RelationshipService cache after relationship changes ([54a5c3be](https://github.com/pixelfed/pixelfed/commit/54a5c3be)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3)