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 setNotificationChannels method in DeploymentSuccess.php

Andras Bacsai17e81ab6bdda
diff --git a/app/Notifications/Application/DeploymentSuccess.php b/app/Notifications/Application/DeploymentSuccess.php
index 322df5cec1..816dac19dd 100644
--- a/app/Notifications/Application/DeploymentSuccess.php
+++ b/app/Notifications/Application/DeploymentSuccess.php
@@ -43,15 +43,8 @@ class DeploymentSuccess extends Notification implements ShouldQueue
public function via(object $notifiable): array
{
- $channels = setNotificationChannels($notifiable, 'deployments');
- if (isCloud()) {
- $channels = array_filter($channels, function ($channel) {
- return $channel !== 'App\Notifications\Channels\EmailChannel';
- });
- }
- return $channels;
+ return setNotificationChannels($notifiable, 'deployments');
}
-
public function toMail(): MailMessage
{
$mail = new MailMessage();