import EventOrganizerMail from "./EventOrganizerMail";
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
export default class VideoEventOrganizerMail extends EventOrganizerMail {
/**
* Adds the video call information to the mail body
* and calendar event description.
*
* @protected
*/
protected getAdditionalBody(): string {
if (!this.calEvent.videoCallData) {
return "";
}
const meetingPassword = this.calEvent.videoCallData.password;
const meetingId = getFormattedMeetingId(this.calEvent.videoCallData);
// This odd indentation is necessary because otherwise the leading tabs will be applied into the event description.
if (meetingPassword && meetingId) {
return `
${this.calEvent.language("video_call_provider")}: ${getIntegrationName(
this.calEvent.videoCallData
)}
${this.calEvent.language("meeting_id")}: ${getFormattedMeetingId(
this.calEvent.videoCallData
)}
${this.calEvent.language("meeting_password")}: ${this.calEvent.videoCallData.password}
${this.calEvent.language("meeting_url")}: ${
this.calEvent.videoCallData.url
}
`;
}
return `
${this.calEvent.language("video_call_provider")}: ${getIntegrationName(
this.calEvent.videoCallData
)}
${this.calEvent.language("meeting_url")}: ${
this.calEvent.videoCallData.url
}
`;
}
}