2021-07-20 18:40:41 +00:00
|
|
|
import { CalendarEvent } from "../calendarClient";
|
2021-06-16 22:26:51 +00:00
|
|
|
import EventAttendeeMail from "./EventAttendeeMail";
|
2021-07-20 18:40:41 +00:00
|
|
|
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
|
|
|
|
import { VideoCallData } from "../videoClient";
|
|
|
|
import { AdditionInformation } from "@lib/emails/EventMail";
|
2021-06-16 22:26:51 +00:00
|
|
|
|
|
|
|
export default class VideoEventAttendeeMail extends EventAttendeeMail {
|
|
|
|
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);
|
|
|
|
this.videoCallData = videoCallData;
|
2021-07-20 18:40:41 +00:00
|
|
|
this.additionInformation = additionInformation;
|
2021-06-16 22:26:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds the video call information to the mail body.
|
|
|
|
*
|
|
|
|
* @protected
|
|
|
|
*/
|
|
|
|
protected getAdditionalBody(): string {
|
|
|
|
return `
|
2021-06-16 22:56:02 +00:00
|
|
|
<strong>Video call provider:</strong> ${getIntegrationName(this.videoCallData)}<br />
|
|
|
|
<strong>Meeting ID:</strong> ${getFormattedMeetingId(this.videoCallData)}<br />
|
2021-06-16 22:26:51 +00:00
|
|
|
<strong>Meeting Password:</strong> ${this.videoCallData.password}<br />
|
|
|
|
<strong>Meeting URL:</strong> <a href="${this.videoCallData.url}">${this.videoCallData.url}</a><br />
|
|
|
|
`;
|
|
|
|
}
|
2021-07-20 18:40:41 +00:00
|
|
|
}
|