2021-09-22 19:52:38 +00:00
|
|
|
import { AdditionInformation } from "@lib/emails/EventMail";
|
|
|
|
|
2021-06-29 22:35:05 +00:00
|
|
|
import { CalendarEvent } from "../calendarClient";
|
|
|
|
import { VideoCallData } from "../videoClient";
|
2021-09-22 19:52:38 +00:00
|
|
|
import EventOrganizerMail from "./EventOrganizerMail";
|
2021-06-29 22:35:05 +00:00
|
|
|
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
|
2021-06-16 21:40:13 +00:00
|
|
|
|
2021-06-18 00:44:41 +00:00
|
|
|
export default class VideoEventOrganizerMail extends EventOrganizerMail {
|
2021-06-16 21:40:13 +00:00
|
|
|
videoCallData: VideoCallData;
|
|
|
|
|
2021-07-20 18:40:41 +00:00
|
|
|
constructor(
|
|
|
|
calEvent: CalendarEvent,
|
|
|
|
uid: string,
|
|
|
|
videoCallData: VideoCallData,
|
|
|
|
additionInformation: AdditionInformation = null
|
|
|
|
) {
|
2021-06-16 22:26:51 +00:00
|
|
|
super(calEvent, uid);
|
2021-06-16 21:40:13 +00:00
|
|
|
this.videoCallData = videoCallData;
|
2021-07-20 18:40:41 +00:00
|
|
|
this.additionInformation = additionInformation;
|
2021-06-16 21:40:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds the video call information to the mail body
|
|
|
|
* and calendar event description.
|
|
|
|
*
|
|
|
|
* @protected
|
|
|
|
*/
|
|
|
|
protected getAdditionalBody(): string {
|
2021-06-29 22:35:05 +00:00
|
|
|
// This odd indentation is necessary because otherwise the leading tabs will be applied into the event description.
|
2021-06-16 21:40:13 +00:00
|
|
|
return `
|
2021-06-29 22:35:05 +00:00
|
|
|
<strong>Video call provider:</strong> ${getIntegrationName(this.videoCallData)}<br />
|
|
|
|
<strong>Meeting ID:</strong> ${getFormattedMeetingId(this.videoCallData)}<br />
|
|
|
|
<strong>Meeting Password:</strong> ${this.videoCallData.password}<br />
|
|
|
|
<strong>Meeting URL:</strong> <a href="${this.videoCallData.url}">${this.videoCallData.url}</a><br />
|
2021-06-16 21:40:13 +00:00
|
|
|
`;
|
|
|
|
}
|
2021-06-29 22:35:05 +00:00
|
|
|
}
|