From 6fc89824788d4f0d6f385b89d64e8e62ac92d84e Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 26 Jan 2023 12:59:33 -0800 Subject: [PATCH] Have acceptance result notifications adhere to alerts enabled setting --- app/Notifications/AcceptanceAssetAcceptedNotification.php | 5 +++++ app/Notifications/AcceptanceAssetDeclinedNotification.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/app/Notifications/AcceptanceAssetAcceptedNotification.php b/app/Notifications/AcceptanceAssetAcceptedNotification.php index c667588dae..03a608fdd8 100644 --- a/app/Notifications/AcceptanceAssetAcceptedNotification.php +++ b/app/Notifications/AcceptanceAssetAcceptedNotification.php @@ -46,6 +46,11 @@ class AcceptanceAssetAcceptedNotification extends Notification } + public function shouldSend($notifiable, $channel) + { + return $this->settings->alerts_enabled && ! empty($this->settings->alert_email); + } + /** * Get the mail representation of the notification. * diff --git a/app/Notifications/AcceptanceAssetDeclinedNotification.php b/app/Notifications/AcceptanceAssetDeclinedNotification.php index 9446747353..5028a77fe2 100644 --- a/app/Notifications/AcceptanceAssetDeclinedNotification.php +++ b/app/Notifications/AcceptanceAssetDeclinedNotification.php @@ -44,6 +44,11 @@ class AcceptanceAssetDeclinedNotification extends Notification } + public function shouldSend($notifiable, $channel) + { + return $this->settings->alerts_enabled && ! empty($this->settings->alert_email); + } + /** * Get the mail representation of the notification. *