diff --git a/backend/src/plugins/Automod/triggers/matchMimeType.ts b/backend/src/plugins/Automod/triggers/matchMimeType.ts index f38bb8fa..5e00d4b6 100644 --- a/backend/src/plugins/Automod/triggers/matchMimeType.ts +++ b/backend/src/plugins/Automod/triggers/matchMimeType.ts @@ -30,7 +30,8 @@ export const MatchMimeTypeTrigger = automodTrigger()({ if (!attachments) return null; for (const attachment of attachments) { - const { contentType } = attachment; + const { contentType: rawContentType } = attachment; + const contentType = (rawContentType || "").split(";")[0]; // Remove "; charset=utf8" and similar from the end const blacklist = trigger.blacklist_enabled ? (trigger.mime_type_blacklist ?? []).map(_t => _t.toLowerCase())