Scheduling infrastructure for absolutely everyone.
hotfix: location on approval email (#1186)
Mihai Cdfb1b5602d8c
diff --git a/lib/emails/EventAttendeeMail.ts b/lib/emails/EventAttendeeMail.tsindex 2058e6ea99c..299a0bfd66b 100644--- a/lib/emails/EventAttendeeMail.ts+++ b/lib/emails/EventAttendeeMail.ts@@ -75,10 +75,7 @@ export default class EventAttendeeMail extends EventMail {</small></td></tr>- <tr>- <td>${this.calEvent.language("where")}</td>- <td>${this.getLocation()}</td>- </tr>+ ${this.getLocation()}<tr><td>${this.calEvent.language("notes")}</td><td>${this.calEvent.description}</td>@@ -107,7 +104,13 @@ export default class EventAttendeeMail extends EventMail {*/protected getLocation(): string {if (this.calEvent.additionInformation?.hangoutLink) {- return `<a href="${this.calEvent.additionInformation?.hangoutLink}">${this.calEvent.additionInformation?.hangoutLink}</a><br />`;+ return `<tr>+ <td>${this.calEvent.language("where")}</td>+ <td><a href="${this.calEvent.additionInformation?.hangoutLink}">${+ this.calEvent.additionInformation?.hangoutLink+ }</a><br /></td>+ </tr>+ `;}if (@@ -117,16 +120,30 @@ export default class EventAttendeeMail extends EventMail {const locations = this.calEvent.additionInformation?.entryPoints.map((entryPoint) => {return `- ${this.calEvent.language("join_by_entrypoint", { entryPoint: entryPoint.entryPointType })}: <br />- <a href="${entryPoint.uri}">${entryPoint.label}</a> <br />- `;+ ${this.calEvent.language("join_by_entrypoint", { entryPoint: entryPoint.entryPointType })}: <br />+ <a href="${entryPoint.uri}">${entryPoint.label}</a> <br />+ `;}).join("<br />");- return `${locations}`;+ return `<tr>+ <td>${this.calEvent.language("where")}</td>+ <td>${locations}</td>+ </tr>+ `;+ }++ if (!this.calEvent.location) {+ return ``;+ }++ if (this.calEvent.location === "integrations:zoom" || this.calEvent.location === "integrations:daily") {+ return ``;}- return this.calEvent.location ? `${this.calEvent.location}<br /><br />` : "";+ return `<tr><td>${this.calEvent.language("where")}</td><td>${+ this.calEvent.location+ }<br /><br /></td></tr>`;}protected getAdditionalBody(): string {diff --git a/lib/emails/EventOrganizerMail.ts b/lib/emails/EventOrganizerMail.tsindex a08e40f6e44..f8bb78db6c9 100644--- a/lib/emails/EventOrganizerMail.ts+++ b/lib/emails/EventOrganizerMail.ts@@ -3,7 +3,7 @@ import localizedFormat from "dayjs/plugin/localizedFormat";import timezone from "dayjs/plugin/timezone";import toArray from "dayjs/plugin/toArray";import utc from "dayjs/plugin/utc";-import { createEvent } from "ics";+import { createEvent, DateArray } from "ics";import { Person } from "@lib/calendarClient";@@ -26,7 +26,7 @@ export default class EventOrganizerMail extends EventMail {.utc().toArray().slice(0, 6)- .map((v, i) => (i === 1 ? v + 1 : v)),+ .map((v, i) => (i === 1 ? v + 1 : v)) as DateArray,startInputType: "utc",productId: "calendso/ics",title: this.calEvent.language("organizer_ics_event_title", {@@ -125,10 +125,7 @@ export default class EventOrganizerMail extends EventMail {this.calEvent.attendees[0].email}">${this.calEvent.attendees[0].email}</a></small></td></tr>- <tr>- <td>${this.calEvent.language("where")}</td>- <td>${this.getLocation()}</td>- </tr>+ ${this.getLocation()}<tr><td>${this.calEvent.language("notes")}</td><td>${this.calEvent.description}</td>@@ -157,7 +154,13 @@ export default class EventOrganizerMail extends EventMail {*/protected getLocation(): string {if (this.calEvent.additionInformation?.hangoutLink) {- return `<a href="${this.calEvent.additionInformation?.hangoutLink}">${this.calEvent.additionInformation?.hangoutLink}</a><br />`;+ return `<tr>+ <td>${this.calEvent.language("where")}</td>+ <td><a href="${this.calEvent.additionInformation?.hangoutLink}">${+ this.calEvent.additionInformation?.hangoutLink+ }</a><br /></td>+ </tr>+ `;}if (@@ -173,10 +176,24 @@ export default class EventOrganizerMail extends EventMail {}).join("<br />");- return `${locations}`;+ return `<tr>+ <td>${this.calEvent.language("where")}</td>+ <td>${locations}</td>+ </tr>+ `;+ }++ if (!this.calEvent.location) {+ return ``;+ }++ if (this.calEvent.location === "integrations:zoom" || this.calEvent.location === "integrations:daily") {+ return ``;}- return this.calEvent.location ? `${this.calEvent.location}<br /><br />` : "";+ return `<tr><td>${this.calEvent.language("where")}</td><td>${+ this.calEvent.location+ }<br /><br /></td></tr>`;}protected getAdditionalBody(): string {diff --git a/lib/events/EventManager.ts b/lib/events/EventManager.tsindex e2229f13a05..9af5153d14a 100644--- a/lib/events/EventManager.ts+++ b/lib/events/EventManager.ts@@ -399,9 +399,9 @@ export default class EventManager {// future, it might happen that we consider making passwords for Zoom meetings optional.// Then, this part below (where the password existence is checked) needs to be adapted.isComplete =- reference.meetingId != undefined &&- reference.meetingPassword != undefined &&- reference.meetingUrl != undefined;+ reference.meetingId !== undefined &&+ reference.meetingPassword !== undefined &&+ reference.meetingUrl !== undefined;break;default:isComplete = true;diff --git a/lib/videoClient.ts b/lib/videoClient.tsindex 647a663f5ee..576ee6a8cc7 100644--- a/lib/videoClient.ts+++ b/lib/videoClient.ts@@ -170,15 +170,6 @@ const updateMeeting = async (}): undefined;- if (!updatedMeeting) {- return {- type: credential.type,- success,- uid,- originalEvent: calEvent,- };- }-try {const organizerMail = new EventOrganizerRescheduledMail(calEvent);await organizerMail.sendEmail();