don't send scheduled (#6072)
Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
1 parent
fd37397e5c
commit
c39a7dba85
1 file changed
+2
@@ -147,6 +147,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
|
|
||||||
const batchId = batchIdResponse[1].batch_id;
|
const batchId = batchIdResponse[1].batch_id;
|
||||||
|
|
||||||
|
if (reminder.workflowStep.action !== WorkflowActions.EMAIL_ADDRESS) {
|
||||||
await sgMail.send({
|
await sgMail.send({
|
||||||
to: sendTo,
|
to: sendTo,
|
||||||
from: senderEmail,
|
from: senderEmail,
|
||||||
@@ -157,6 +158,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
sendAt: dayjs(reminder.scheduledDate).unix(),
|
sendAt: dayjs(reminder.scheduledDate).unix(),
|
||||||
replyTo: reminder.booking?.user?.email || senderEmail,
|
replyTo: reminder.booking?.user?.email || senderEmail,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await prisma.workflowReminder.update({
|
await prisma.workflowReminder.update({
|
||||||
where: {
|
where: {
|
||||||
|
|||||||
Reference in new issue
Block a user