Fix/event location when fallback video (#5216)

pull/5236/head^2
alannnc 2022-10-26 14:16:38 -06:00 committed by GitHub
parent 1a104f172d
commit a7a82a6b51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -98,8 +98,11 @@ export default class EventManager {
// If and only if event type is a dedicated meeting, create a dedicated video meeting. // If and only if event type is a dedicated meeting, create a dedicated video meeting.
if (isDedicated) { if (isDedicated) {
const result = await this.createVideoEvent(evt); const result = await this.createVideoEvent(evt);
if (result.createdEvent) { if (result.createdEvent) {
evt.videoCallData = result.createdEvent; evt.videoCallData = result.createdEvent;
evt.location = result.originalEvent.location;
result.type = result.createdEvent.type;
} }
results.push(result); results.push(result);
@ -113,6 +116,7 @@ export default class EventManager {
if (typeof result?.createdEvent === "string") { if (typeof result?.createdEvent === "string") {
createdEventObj = createdEventSchema.parse(JSON.parse(result.createdEvent)); createdEventObj = createdEventSchema.parse(JSON.parse(result.createdEvent));
} }
return { return {
type: result.type, type: result.type,
uid: createdEventObj ? createdEventObj.id : result.createdEvent?.id?.toString() ?? "", uid: createdEventObj ? createdEventObj.id : result.createdEvent?.id?.toString() ?? "",