diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index 9e05962ba..8f9c14206 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -1969,10 +1969,7 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
if (!$this->only_this_server) {
$this->deploy_to_additional_destinations();
}
- if (!isCloud()) {
- // TODO: turn off until we have a better solution
- $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));
}
}
diff --git a/app/Notifications/Application/DeploymentSuccess.php b/app/Notifications/Application/DeploymentSuccess.php
index 816dac19d..e138ac91e 100644
--- a/app/Notifications/Application/DeploymentSuccess.php
+++ b/app/Notifications/Application/DeploymentSuccess.php
@@ -43,7 +43,12 @@ class DeploymentSuccess extends Notification implements ShouldQueue
public function via(object $notifiable): array
{
- return setNotificationChannels($notifiable, 'deployments');
+ $channels = setNotificationChannels($notifiable, 'deployments');
+ if (isCloud()) {
+ // TODO: Make batch notifications work with email
+ $channels = array_diff($channels, ['App\Notifications\Channels\EmailChannel']);
+ }
+ return $channels;
}
public function toMail(): MailMessage
{
diff --git a/app/Notifications/Channels/TelegramChannel.php b/app/Notifications/Channels/TelegramChannel.php
index 1401bb324..12695497a 100644
--- a/app/Notifications/Channels/TelegramChannel.php
+++ b/app/Notifications/Channels/TelegramChannel.php
@@ -14,20 +14,22 @@ class TelegramChannel
$buttons = data_get($data, 'buttons', []);
$telegramToken = data_get($telegramData, 'token');
$chatId = data_get($telegramData, 'chat_id');
- $topicId = null;
+ $topicId = null;
$topicsInstance = get_class($notification);
switch ($topicsInstance) {
- case 'App\Notifications\StatusChange':
- $topicId = data_get($notifiable, 'telegram_notifications_status_changes_message_thread_id');
- break;
case 'App\Notifications\Test':
$topicId = data_get($notifiable, 'telegram_notifications_test_message_thread_id');
break;
- case 'App\Notifications\Deployment':
+ case 'App\Notifications\Application\StatusChanged':
+ $topicId = data_get($notifiable, 'telegram_notifications_status_changes_message_thread_id');
+ break;
+ case 'App\Notifications\Application\DeploymentSuccess':
+ case 'App\Notifications\Application\DeploymentFailed':
$topicId = data_get($notifiable, 'telegram_notifications_deployments_message_thread_id');
break;
- case 'App\Notifications\DatabaseBackup':
+ case 'App\Notifications\Database\BackupSuccess':
+ case 'App\Notifications\Database\BackupFailed':
$topicId = data_get($notifiable, 'telegram_notifications_database_backups_message_thread_id');
break;
}
diff --git a/resources/views/livewire/notifications/telegram.blade.php b/resources/views/livewire/notifications/telegram.blade.php
index 4925b9f75..1d8e1231c 100644
--- a/resources/views/livewire/notifications/telegram.blade.php
+++ b/resources/views/livewire/notifications/telegram.blade.php
@@ -7,7 +7,7 @@
Save
@if ($team->telegram_enabled)
-