init: hide cal branding on user level (#27594)

This commit is contained in:
Rajiv Sahal
2026-02-04 21:52:40 +09:00
committed by GitHub
parent fc602d3b03
commit 2c28c9c028
9 changed files with 25 additions and 3 deletions
@@ -65,7 +65,7 @@ export const BaseScheduledEmail = (
return (
<BaseEmailHtml
hideLogo={Boolean(props.calEvent.platformClientId)}
hideLogo={Boolean(props.calEvent.platformClientId || props.calEvent.hideBranding)}
headerType={props.headerType || "checkCircle"}
subject={props.subject || subject}
title={t(
+10
View File
@@ -271,6 +271,8 @@ export class CalendarEventBuilder {
builder.withDestinationCalendar([user.destinationCalendar]);
}
builder.withHideBranding(!!eventType.owner?.hideBranding);
return builder;
}
@@ -549,6 +551,14 @@ export class CalendarEventBuilder {
return this;
}
withHideBranding(hideBranding: boolean) {
this.event = {
...this.event,
hideBranding,
};
return this;
}
build(): CalendarEvent | null {
// Validate required fields
if (
@@ -396,6 +396,7 @@ async function handler(input: CancelBookingInput, dependencies?: Dependencies) {
platformRescheduleUrl,
platformCancelUrl,
hideOrganizerEmail: bookingToDelete.eventType?.hideOrganizerEmail,
hideBranding: !!bookingToDelete.eventType?.owner?.hideBranding,
platformBookingUrl,
customReplyToEmail: bookingToDelete.eventType?.customReplyToEmail,
organizationId: ownerProfile?.organizationId ?? null,
@@ -1574,6 +1574,7 @@ async function handler(
}
let evt: CalendarEvent = builtEvt;
evt.hideBranding = !!eventType.owner?.hideBranding;
if (input.bookingData.thirdPartyRecurringEventId) {
const updatedEvt = CalendarEventBuilder.fromEvent(evt)
@@ -303,6 +303,11 @@ const selectStatementToGetBookingForCalEventBuilder = {
destinationCalendar: true,
},
},
owner: {
select: {
hideBranding: true,
},
},
hosts: {
select: {
userId: true,
@@ -503,7 +503,8 @@ export class ManagedEventManualReassignmentService {
.withIdentifiers({
iCalUID: newBooking.iCalUID || undefined,
})
.withUid(newBooking.uid);
.withUid(newBooking.uid)
.withHideBranding(!!newUser.hideBranding);
if (newUser.destinationCalendar) {
builder.withDestinationCalendar([newUser.destinationCalendar]);
@@ -716,7 +717,8 @@ export class ManagedEventManualReassignmentService {
.withLocation({
location: bookingLocation || null,
})
.withUid(newBooking.uid);
.withUid(newBooking.uid)
.withHideBranding(!!newUser.hideBranding);
if (videoCallData) {
emailBuilder.withVideoCallData(videoCallData);
@@ -354,6 +354,7 @@ export const roundRobinManualReassignment = async ({
booking,
}),
customReplyToEmail: eventType?.customReplyToEmail,
hideBranding: !!eventType?.owner?.hideBranding,
location: bookingLocation,
...(platformClientParams ? platformClientParams : {}),
conferenceCredentialId: conferenceCredentialId ?? undefined,
@@ -1331,6 +1331,7 @@ export class UserRepository {
locale: true,
timeFormat: true,
metadata: true,
hideBranding: true,
credentials: {
select: credentialForCalendarServiceSelect,
},
+1
View File
@@ -207,6 +207,7 @@ export interface CalendarEvent {
iCalUID?: string | null;
iCalSequence?: number | null;
hideOrganizerEmail?: boolean;
hideBranding?: boolean;
disableCancelling?: boolean;
disableRescheduling?: boolean;