mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update UserFilterObserver, dispatch FeedFollowPipeline jobs
This commit is contained in:
parent
e917341651
commit
125208fb9e
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue