mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 22:21:51 +00:00
Ignore mime type charset and other extra details in match_mime_type
This commit is contained in:
parent
497d334b15
commit
70fb0b5baa
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,8 @@ export const MatchMimeTypeTrigger = automodTrigger<MatchResultType>()({
|
||||||
if (!attachments) return null;
|
if (!attachments) return null;
|
||||||
|
|
||||||
for (const attachment of attachments) {
|
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
|
const blacklist = trigger.blacklist_enabled
|
||||||
? (trigger.mime_type_blacklist ?? []).map(_t => _t.toLowerCase())
|
? (trigger.mime_type_blacklist ?? []).map(_t => _t.toLowerCase())
|
||||||
|
|
Loading…
Add table
Reference in a new issue