From ce7ffc8c4341d38b86e5d1bae109f1fc72b9f037 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 21 Jun 2023 12:06:35 +0200 Subject: [PATCH] fix --- .../DeployedSuccessfullyNotification.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Notifications/Notifications/Application/DeployedSuccessfullyNotification.php b/app/Notifications/Notifications/Application/DeployedSuccessfullyNotification.php index 245aa194b..916cc82b8 100644 --- a/app/Notifications/Notifications/Application/DeployedSuccessfullyNotification.php +++ b/app/Notifications/Notifications/Application/DeployedSuccessfullyNotification.php @@ -80,11 +80,16 @@ class DeployedSuccessfullyNotification extends Notification implements ShouldQue { if ($this->preview) { $message = '✅ Pull request #' . $this->preview->pull_request_id . ' of **' . $this->application_name . '** deployed successfully: '; - $message .= '[Application Link](' . $this->preview->fqdn . ') | [Deployment logs](' . $this->deployment_url . ')'; + if ($this->preview->fqdn) { + $message .= '[Application Link](' . $this->preview->fqdn . ') |'; + } + $message .= '[Deployment logs](' . $this->deployment_url . ')'; } else { - $message = '✅ A new version has been deployed of **' . $this->application_name . '**.'; - $message .= "\n\n"; - $message .= '[Application Link](' . $this->fqdn . ') | [Deployment logs](' . $this->deployment_url . ')'; + $message = '✅ A new version has been deployed of **' . $this->application_name . '**: '; + if ($this->fqdn) { + $message .= '[Application Link](' . $this->fqdn . ') |'; + } + $message .= '[Deployment logs](' . $this->deployment_url . ')'; } return $message; }