Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Refactor notification channels based on cloud environment

Andras Bacsai9fa71f847f4c
diff --git a/app/Notifications/Application/DeploymentSuccess.php b/app/Notifications/Application/DeploymentSuccess.php
index 8a409aa94b..322df5cec1 100644
--- a/app/Notifications/Application/DeploymentSuccess.php
+++ b/app/Notifications/Application/DeploymentSuccess.php
@@ -44,9 +44,11 @@ class DeploymentSuccess extends Notification implements ShouldQueue
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;
}