From 4315f6de8b02b64d752b3fead865d398cb6ecd24 Mon Sep 17 00:00:00 2001 From: chelsea-EYDS Date: Mon, 27 Jan 2025 10:53:55 -0800 Subject: [PATCH] fix triggered email send --- backend/src/mail/mail.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/mail/mail.service.ts b/backend/src/mail/mail.service.ts index f9800bc4..2c1de3d1 100644 --- a/backend/src/mail/mail.service.ts +++ b/backend/src/mail/mail.service.ts @@ -210,7 +210,13 @@ export class MailService { this.logger.log( `Total emails to be sent (after filter existing): ${filteredContexts?.length}`, ); - return filteredContexts; + if (filteredContexts.length > 0) { + return filteredContexts; + } else { + return contexts; + } + } else { + return contexts; } } /**