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:
@@ -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';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user