fix: hide cal branding on platform workflows (#27385)

* fix: hide cal branding on platform workflows

* refactor: rely on existing with platform variables code

* revert: comment

* fix e2e

* chore: remove unit results
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2026-02-09 13:46:52 -03:00
1 parent f66fffd13b
commit edf9cd70dd
9 files changed
+90 -32

No files matched your search

@@ -87,9 +87,10 @@ export class EmailWorkflowService {
creditCheckFn,
});
const hideBranding = await getHideBranding({
userId: workflow.userId ?? undefined,
teamId: workflow.teamId ?? undefined,
const hideBranding = await this.shouldHideBranding({
platformClientId: evt.platformClientId,
userId: workflow.userId,
teamId: workflow.teamId,
});
const emailWorkflowContentParams = await this.generateParametersToBuildEmailWorkflowContent({
@@ -237,6 +238,27 @@ export class EmailWorkflowService {
} as const;
}
private async shouldHideBranding({
platformClientId,
userId,
teamId,
}: {
platformClientId?: string | null;
userId?: number | null;
teamId?: number | null;
}): Promise<boolean> {
if (platformClientId) {
return true;
}
const hideBranding = await getHideBranding({
userId: userId ?? undefined,
teamId: teamId ?? undefined,
});
return hideBranding;
}
async generateEmailPayloadForEvtWorkflow({
evt,
sendTo,
@@ -412,6 +434,7 @@ export class EmailWorkflowService {
meetingUrl,
otherPerson: attendeeName,
name,
isBrandingDisabled: hideBranding,
});
} else if (matchedTemplate === WorkflowTemplates.RATING) {
emailContent = emailRatingTemplate({
@@ -426,6 +449,7 @@ export class EmailWorkflowService {
timeZone,
organizer: evt.organizer.name,
name,
isBrandingDisabled: hideBranding,
ratingUrl: `${bookerUrl}/booking/${evt.uid}?rating`,
noShowUrl: `${bookerUrl}/booking/${evt.uid}?noShow=true`,
});
@@ -554,4 +578,4 @@ export class EmailWorkflowService {
sender,
};
}
}
}
@@ -89,6 +89,7 @@ export type BookingInfo = {
videoCallData?: {
url?: string;
};
platformClientId?: string | null;
};
export type WorkflowContextData =