Ignore disabled components when determining if a subscription is 'global'

This commit is contained in:
Casper Langemeijer
2020-05-13 18:07:52 +02:00
parent c7ad51e876
commit 0b38e41e5d

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);