feat: initialize CalBook project with comprehensive scheduling, admin, and deployment infrastructure

This commit is contained in:
2026-05-07 13:04:02 +02:00
parent 51acfe9488
commit ee48a93824
133 changed files with 26049 additions and 0 deletions

21
lib/email/shortcodes.ts Normal file
View File

@@ -0,0 +1,21 @@
const DEFAULT_MEETING_BUTTON_SHORTCODES = [
"{{meetingButton}}",
"{{jitsiButton}}",
"[meeting_button]",
"[jitsi_button]"
];
export function normalizeMeetingButtonTemplate(
template: string,
shortcodes: string[] = DEFAULT_MEETING_BUTTON_SHORTCODES
) {
if (!template) return template;
const hasShortcode = shortcodes.some((token) => template.includes(token));
if (hasShortcode) return template;
return template
.replace(/Jitsi-Link:\s*\{\{meetingUrl\}\}/gi, "{{meetingButton}}")
.replace(/Jitsi:\s*\{\{meetingUrl\}\}/gi, "{{meetingButton}}")
.replace(/\{\{meetingUrl\}\}/g, "{{meetingButton}}");
}