fix: do not send email if 0 notifications
This commit is contained in:
@@ -59,7 +59,9 @@ async function consumeQueue() {
|
|||||||
body += `<h3>${message.subject}</h3>\n`
|
body += `<h3>${message.subject}</h3>\n`
|
||||||
body += `<div>${message.body}</div>\n`
|
body += `<div>${message.body}</div>\n`
|
||||||
}
|
}
|
||||||
await sendEmail(subject, body, cc || undefined)
|
if (messages.length) {
|
||||||
|
await sendEmail(subject, body, cc || undefined)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const mail = queue.shift() as MailContent
|
const mail = queue.shift() as MailContent
|
||||||
|
|||||||
Reference in New Issue
Block a user