Merge pull request #4022 from langemeijer/no-disable-compontents-in-global

Ignore disabled components when determining if a subscription is 'global'
This commit is contained in:
James Brooks 2020-08-01 09:07:35 +01:00 committed by GitHub
commit 9a83bb3171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ class UpdateSubscriberSubscriptionCommandHandler
$subscriber = $command->subscriber;
$subscriptions = $command->subscriptions ?: [];
$components = Component::all();
$components = Component::enabled()->get();
$updateSubscriptions = $components->filter(function ($item) use ($subscriptions) {
return in_array($item->id, $subscriptions);