mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 09:35:02 +00:00
Ignore mime type charset and other extra details in match_mime_type
This commit is contained in:
parent
0684d07102
commit
8ff3816e83
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
Add a link
Reference in a new issue