cal.pub0.org/lib/emails/VideoEventOrganizerMail.ts

30 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-06-29 22:35:05 +00:00
import { CalendarEvent } from "../calendarClient";
import EventOrganizerMail from "./EventOrganizerMail";
2021-06-29 22:35:05 +00:00
import { VideoCallData } from "../videoClient";
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
export default class VideoEventOrganizerMail extends EventOrganizerMail {
videoCallData: VideoCallData;
constructor(calEvent: CalendarEvent, uid: string, videoCallData: VideoCallData) {
super(calEvent, uid);
this.videoCallData = videoCallData;
}
/**
* 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.
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-29 22:35:05 +00:00
}