Skip to content

Scheduling infrastructure for absolutely everyone.

Send email when no integrations are present as well

nicolascb9d7493105c
diff --git a/pages/api/book/[user].ts b/pages/api/book/[user].ts
index 792351f6924..669c8c203ea 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
);