From d563f3f78ab14a04aded397245d0c02a24531da6 Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Tue, 25 Mar 2025 10:16:06 -0500 Subject: [PATCH] Fix logic in text handlebars template (#5542) --- .../SecurityTasksNotification.text.hbs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Core/MailTemplates/Handlebars/SecurityTasksNotification.text.hbs b/src/Core/MailTemplates/Handlebars/SecurityTasksNotification.text.hbs index f5493e4503..f6c0921165 100644 --- a/src/Core/MailTemplates/Handlebars/SecurityTasksNotification.text.hbs +++ b/src/Core/MailTemplates/Handlebars/SecurityTasksNotification.text.hbs @@ -6,12 +6,14 @@ Launch the Bitwarden extension to review your at-risk passwords. Review at-risk passwords ({{{ReviewPasswordsUrl}}}) -{{#if (eq (length AdminOwnerEmails) 1)}} -This request was initiated by {{AdminOwnerEmails.[0]}}. -{{else}} -This request was initiated by -{{#each AdminOwnerEmails}} - {{#if @last}}and {{/if}}{{this}}{{#unless @last}}, {{/unless}} -{{/each}}. +{{#if AdminOwnerEmails.[0]}} + {{#if AdminOwnerEmails.[1]}} + This request was initiated by + {{#each AdminOwnerEmails}} + {{#if @last}}and {{/if}}{{this}}{{#unless @last}}, {{/unless}} + {{/each}}. + {{else}} + This request was initiated by {{AdminOwnerEmails.[0]}}. + {{/if}} {{/if}} {{/SecurityTasksHtmlLayout}}