From 6d8121413865c00f6ccc8e46ff2e367bb603bd66 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 21 Dec 2023 00:44:54 -0700 Subject: [PATCH] Update DomainBlockController, purge domainBlocks cache --- app/Http/Controllers/Api/V1/DomainBlockController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Api/V1/DomainBlockController.php b/app/Http/Controllers/Api/V1/DomainBlockController.php index 53a209ed9..2186c0936 100644 --- a/app/Http/Controllers/Api/V1/DomainBlockController.php +++ b/app/Http/Controllers/Api/V1/DomainBlockController.php @@ -6,6 +6,7 @@ use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Models\UserDomainBlock; use App\Util\ActivityPub\Helpers; +use App\Services\UserFilterService; use Illuminate\Bus\Batch; use Illuminate\Support\Facades\Bus; use Illuminate\Support\Facades\Cache; @@ -90,6 +91,7 @@ class DomainBlockController extends Controller ])->allowFailures()->onQueue('feed')->dispatch(); Cache::forget('profile:following:' . $pid); + UserFilterService::domainBlocks($pid, true); } return $this->json([]); @@ -109,6 +111,8 @@ class DomainBlockController extends Controller $filters = UserDomainBlock::whereProfileId($pid)->whereDomain($domain)->delete(); + UserFilterService::domainBlocks($pid, true); + return $this->json([]); } }