From 125208fb9e5956bac2c32b4f68ac08ba640eb88a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 12 Nov 2023 23:52:10 -0700 Subject: [PATCH] Update UserFilterObserver, dispatch FeedFollowPipeline jobs --- app/Observers/UserFilterObserver.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Observers/UserFilterObserver.php b/app/Observers/UserFilterObserver.php index 8e149e7d9..75867e64b 100644 --- a/app/Observers/UserFilterObserver.php +++ b/app/Observers/UserFilterObserver.php @@ -4,6 +4,8 @@ namespace App\Observers; use App\UserFilter; use App\Services\UserFilterService; +use App\Jobs\HomeFeedPipeline\FeedFollowPipeline; +use App\Jobs\HomeFeedPipeline\FeedUnfollowPipeline; class UserFilterObserver { @@ -78,10 +80,12 @@ class UserFilterObserver switch ($userFilter->filter_type) { case 'mute': UserFilterService::mute($userFilter->user_id, $userFilter->filterable_id); + FeedUnfollowPipeline::dispatch($userFilter->user_id, $userFilter->filterable_id)->onQueue('feed'); break; case 'block': UserFilterService::block($userFilter->user_id, $userFilter->filterable_id); + FeedUnfollowPipeline::dispatch($userFilter->user_id, $userFilter->filterable_id)->onQueue('feed'); break; } } @@ -96,10 +100,12 @@ class UserFilterObserver switch ($userFilter->filter_type) { case 'mute': UserFilterService::unmute($userFilter->user_id, $userFilter->filterable_id); + FeedFollowPipeline::dispatch($userFilter->user_id, $userFilter->filterable_id)->onQueue('feed'); break; case 'block': UserFilterService::unblock($userFilter->user_id, $userFilter->filterable_id); + FeedFollowPipeline::dispatch($userFilter->user_id, $userFilter->filterable_id)->onQueue('feed'); break; } }