fix: allow-reschedule-on-prevent-impersonation (#25427)

* fix: allow-reschedule-on-prevent-impersonation

* remove selfexplanatory comment
This commit is contained in:
Dhairyashil Shinde
2025-11-27 11:39:40 +00:00
committed by GitHub
parent 2701b4de79
commit 33c3bf3558
2 changed files with 4 additions and 1 deletions
@@ -8,10 +8,12 @@ export const checkIfBookerEmailIsBlocked = async ({
bookerEmail,
loggedInUserId,
verificationCode,
isReschedule = false,
}: {
bookerEmail: string;
loggedInUserId?: number;
verificationCode?: string;
isReschedule?: boolean;
}) => {
const baseEmail = extractBaseEmail(bookerEmail);
@@ -52,7 +54,7 @@ export const checkIfBookerEmailIsBlocked = async ({
});
const blockedByUserSetting = user?.requiresBookerEmailVerification ?? false;
const shouldBlock = !!blacklistedByEnv || blockedByUserSetting;
const shouldBlock = !!blacklistedByEnv || (blockedByUserSetting && !isReschedule);
if (!shouldBlock) {
return false;
@@ -542,6 +542,7 @@ async function handler(
loggedInUserId: userId,
bookerEmail,
verificationCode: reqBody.verificationCode,
isReschedule: !!rawBookingData.rescheduleUid,
});
} catch (error) {
if (error instanceof ErrorWithCode) {