From 6f1b02456fcfcbc3ba599524b748f5ba25ddefc3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 6 Jan 2022 01:05:11 -0700 Subject: [PATCH] Update AccountController, refresh RelationshipService on mute/blocks --- app/Http/Controllers/AccountController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index edbf6a4c..073bbfa8 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -28,6 +28,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter; use App\Transformer\Api\Mastodon\v1\AccountTransformer; use App\Services\AccountService; use App\Services\UserFilterService; +use App\Services\RelationshipService; class AccountController extends Controller { @@ -184,6 +185,7 @@ class AccountController extends Controller Cache::forget("user:filter:list:$pid"); Cache::forget("feature:discover:posts:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $profile->id); return redirect()->back(); } @@ -234,6 +236,7 @@ class AccountController extends Controller Cache::forget("user:filter:list:$pid"); Cache::forget("feature:discover:posts:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $profile->id); if($request->wantsJson()) { return response()->json([200]); @@ -288,6 +291,7 @@ class AccountController extends Controller $pid = $user->id; Cache::forget("user:filter:list:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $profile->id); return redirect()->back(); } @@ -338,6 +342,7 @@ class AccountController extends Controller Cache::forget("user:filter:list:$pid"); Cache::forget("feature:discover:posts:$pid"); Cache::forget("api:local:exp:rec:$pid"); + RelationshipService::refresh($pid, $profile->id); return redirect()->back(); }