Fix notification channels in ApplicationDeploymentJob and DeploymentSuccess
This commit is contained in:
		| @@ -1651,7 +1651,7 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf"); | |||||||
|             if (!$this->only_this_server) { |             if (!$this->only_this_server) { | ||||||
|                 $this->deploy_to_additional_destinations(); |                 $this->deploy_to_additional_destinations(); | ||||||
|             } |             } | ||||||
|             // $this->application->environment->project->team?->notify(new DeploymentSuccess($this->application, $this->deployment_uuid, $this->preview));
 |             $this->application->environment->project->team?->notify(new DeploymentSuccess($this->application, $this->deployment_uuid, $this->preview)); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|   | |||||||
| @@ -43,7 +43,11 @@ class DeploymentSuccess extends Notification implements ShouldQueue | |||||||
| 
 | 
 | ||||||
|     public function via(object $notifiable): array |     public function via(object $notifiable): array | ||||||
|     { |     { | ||||||
|         return setNotificationChannels($notifiable, 'deployments'); |         $channels = setNotificationChannels($notifiable, 'deployments'); | ||||||
|  |         $channels = array_filter($channels, function ($channel) { | ||||||
|  |             return $channel !== 'App\Notifications\Channels\EmailChannel'; | ||||||
|  |         }); | ||||||
|  |         return $channels; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public function toMail(): MailMessage |     public function toMail(): MailMessage | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai