From 653af74cfb789e8116e3e4ca2845d4dfab474052 Mon Sep 17 00:00:00 2001 From: paulwer Date: Sun, 3 Mar 2024 08:33:17 +0100 Subject: [PATCH] fixes --- app/Jobs/Brevo/ProcessBrevoWebhook.php | 2 +- app/Jobs/PostMark/ProcessPostmarkWebhook.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Brevo/ProcessBrevoWebhook.php b/app/Jobs/Brevo/ProcessBrevoWebhook.php index 122d030e74..92959f7d2e 100644 --- a/app/Jobs/Brevo/ProcessBrevoWebhook.php +++ b/app/Jobs/Brevo/ProcessBrevoWebhook.php @@ -421,7 +421,7 @@ class ProcessBrevoWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $brevo_secret = isset($this->company->settings->brevo_secret) && trim($this->company->settings->brevo_secret) != '' ? $this->company->settings->brevo_secret : config('services.brevo.key'); + $brevo_secret = !empty($this->company->settings->brevo_secret) ? $this->company->settings->brevo_secret : config('services.brevo.key'); $brevo = new TransactionalEmailsApi(null, Configuration::getDefaultConfiguration()->setApiKey('api-key', $brevo_secret)); $messageDetail = $brevo->getTransacEmailContent($message_id); diff --git a/app/Jobs/PostMark/ProcessPostmarkWebhook.php b/app/Jobs/PostMark/ProcessPostmarkWebhook.php index 0b3a040c00..1664cbafdc 100644 --- a/app/Jobs/PostMark/ProcessPostmarkWebhook.php +++ b/app/Jobs/PostMark/ProcessPostmarkWebhook.php @@ -355,7 +355,7 @@ class ProcessPostmarkWebhook implements ShouldQueue public function getRawMessage(string $message_id) { - $postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token'); + $postmark_secret = !empty($this->company->settings->postmark_secret) ? $this->company->settings->postmark_secret : config('services.postmark.token'); $postmark = new PostmarkClient($postmark_secret); $messageDetail = $postmark->getOutboundMessageDetails($message_id); @@ -388,7 +388,7 @@ class ProcessPostmarkWebhook implements ShouldQueue try { - $postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token'); + $postmark_secret = !empty($this->company->settings->postmark_secret) ? $this->company->settings->postmark_secret : config('services.postmark.token'); $postmark = new PostmarkClient($postmark_secret); $messageDetail = $postmark->getOutboundMessageDetails($this->request['MessageID']);