Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: videoCallUrl is not saved in metadata after rescheduling #7715

4 changes: 2 additions & 2 deletions packages/features/bookings/lib/handleNewBooking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ async function handler(
return prisma.booking.create(createBookingObj);
}

let results: EventResult<AdditionalInformation>[] = [];
let results: EventResult<AdditionalInformation & { url?: string }>[] = [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we shouldn't need to redefine url here but currently reschedule is very weirdly typed and written, doesn't seem like a better way to do it.

let referencesToCreate: PartialReference[] = [];

type Booking = Prisma.PromiseReturnType<typeof createBooking>;
Expand Down Expand Up @@ -1680,7 +1680,7 @@ async function handler(
metadata.conferenceData = updatedEvent.conferenceData;
metadata.entryPoints = updatedEvent.entryPoints;
handleAppsStatus(results, booking);
videoCallUrl = metadata.hangoutLink || videoCallUrl;
videoCallUrl = metadata.hangoutLink || videoCallUrl || updatedEvent?.url;
}
}
if (noEmail !== true) {
Expand Down
6 changes: 0 additions & 6 deletions packages/types/Calendar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ export interface ConferenceData {
createRequest?: calendar_v3.Schema$CreateConferenceRequest;
}

export interface AdditionalInformation {
conferenceData?: ConferenceData;
entryPoints?: EntryPoint[];
hangoutLink?: string;
}

export interface RecurringEvent {
dtstart?: Date | undefined;
interval: number;
Expand Down