From b760be18861854325b43de577920d0e2859e4ebc Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 23 Jun 2023 11:53:39 -0700 Subject: [PATCH] Flexmailer - Simplify conditionals Some branches got swapped around in the past year. The resulting logic can be expressed more simply. --- ext/flexmailer/src/Listener/Abdicator.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ext/flexmailer/src/Listener/Abdicator.php b/ext/flexmailer/src/Listener/Abdicator.php index 3c1a1e2fd8..e5761cc12a 100644 --- a/ext/flexmailer/src/Listener/Abdicator.php +++ b/ext/flexmailer/src/Listener/Abdicator.php @@ -30,15 +30,8 @@ class Abdicator { * @return bool */ public static function isFlexmailPreferred($mailing) { - if ($mailing->sms_provider_id) { - return FALSE; - } - - // Use FlexMailer for new-style email blasts (with custom `template_type`). - if ($mailing->template_type && $mailing->template_type !== 'traditional') { - return TRUE; - } - return TRUE; + // Yes for CiviMail - no for CiviSMS + return empty($mailing->sms_provider_id); } /** -- 2.25.1