Refactor notification channels based on cloud environment

This commit is contained in:
Andras Bacsai 2024-03-01 19:08:00 +01:00
parent f70a9c6974
commit 9fa71f847f

View File

@ -44,9 +44,11 @@ public function __construct(Application $application, string $deployment_uuid, A
public function via(object $notifiable): array
{
$channels = setNotificationChannels($notifiable, 'deployments');
$channels = array_filter($channels, function ($channel) {
return $channel !== 'App\Notifications\Channels\EmailChannel';
});
if (isCloud()) {
$channels = array_filter($channels, function ($channel) {
return $channel !== 'App\Notifications\Channels\EmailChannel';
});
}
return $channels;
}