From cb9d7493105cdac3ec2b3f2f0e3092af0898acd9 Mon Sep 17 00:00:00 2001 From: nicolas Date: Thu, 10 Jun 2021 23:18:57 +0200 Subject: [PATCH] Send email when no integrations are present as well --- pages/api/book/[user].ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/api/book/[user].ts b/pages/api/book/[user].ts index 792351f6..669c8c20 100644 --- a/pages/api/book/[user].ts +++ b/pages/api/book/[user].ts @@ -141,8 +141,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) } }); - // If one of the integrations allows email confirmations, send it. - if (!results.every((result) => result.disableConfirmationEmail)) { + // If one of the integrations allows email confirmations or no integrations are added, send it. + if (currentUser.credentials.length === 0 || !results.every((result) => result.disableConfirmationEmail)) { await createConfirmBookedEmail( evt, hashUID );