Merge pull request #258 from Nico-J/bugfix/no-emails-sent-when-no-integration-added

This commit is contained in:
Bailey Pumfleet 2021-06-10 22:22:10 +01:00 committed by GitHub
commit b7b644998a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,8 +141,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
} }
}); });
// If one of the integrations allows email confirmations, send it. // If one of the integrations allows email confirmations or no integrations are added, send it.
if (!results.every((result) => result.disableConfirmationEmail)) { if (currentUser.credentials.length === 0 || !results.every((result) => result.disableConfirmationEmail)) {
await createConfirmBookedEmail( await createConfirmBookedEmail(
evt, hashUID evt, hashUID
); );