fix: export isCalendarMimeType for use in email attachment filtering

Previously isCalendarMimeType was a module-private function in
lib/calendar-invitation.ts. Exporting it allows the email viewer
to reuse the same MIME type detection logic when filtering out
calendar attachments, avoiding duplication of the type set.
This commit is contained in:
nesgarbo
2026-04-16 16:54:09 +02:00
committed by Linus Rath
parent fb2f0c9158
commit 4c720d6855
+1 -1
View File
@@ -67,7 +67,7 @@ function parseContentType(value?: string | null): { mimeType: string; params: Re
}; };
} }
function isCalendarMimeType(value?: string | null): boolean { export function isCalendarMimeType(value?: string | null): boolean {
const { mimeType } = parseContentType(value); const { mimeType } = parseContentType(value);
return mimeType === 'text/calendar' || mimeType === 'application/ics' || mimeType === 'application/icalendar'; return mimeType === 'text/calendar' || mimeType === 'application/ics' || mimeType === 'application/icalendar';
} }