This commit is contained in:
Andras Bacsai 2023-06-20 20:39:14 +02:00
parent 5c797667bb
commit 43583d7777

View File

@ -25,13 +25,11 @@ public function via(object $notifiable): array
$isDiscord = $this->type === 'discord' || is_null($this->type);
$isEmailEnabled = data_get($notifiable, 'smtp.enabled');
$isDiscordEnabled = data_get($notifiable, 'discord.enabled');
$isSubscribedToEmailTests = data_get($notifiable, 'smtp_notifications.test');
$isSubscribedToDiscordTests = data_get($notifiable, 'discord_notifications.test');
if ($isEmailEnabled && $isSubscribedToEmailTests && $isSmtp) {
if ($isEmailEnabled && $isSmtp) {
$channels[] = EmailChannel::class;
}
if ($isDiscordEnabled && $isSubscribedToDiscordTests && $isDiscord) {
if ($isDiscordEnabled && $isDiscord) {
$channels[] = DiscordChannel::class;
}