Make maintenance also optional to notify subscribers

This commit is contained in:
Anne-Greeth van Herwijnen
2019-04-26 11:50:15 +02:00
parent ef189a4d4f
commit a86793079c
6 changed files with 50 additions and 8 deletions
@@ -51,6 +51,9 @@ class SendScheduleEmailNotificationHandler
public function handle(ScheduleEventInterface $event)
{
$schedule = $event->schedule;
if (!$event->notify) {
return false;
}
// First notify all global subscribers.
$globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get()->each(function ($subscriber) use ($schedule) {