Add smallAttachmentLimit config option to control the size limit of relaySmallAttachmentsAsAttachments
parent
7e7bd03798
commit
b7673b7544
|
@ -69,6 +69,7 @@ const defaultConfig = {
|
||||||
"accountAgeDeniedMessage": "Your Discord account is not old enough to contact modmail.",
|
"accountAgeDeniedMessage": "Your Discord account is not old enough to contact modmail.",
|
||||||
|
|
||||||
"relaySmallAttachmentsAsAttachments": false,
|
"relaySmallAttachmentsAsAttachments": false,
|
||||||
|
"smallAttachmentLimit": 1024 * 1024 * 2,
|
||||||
|
|
||||||
"port": 8890,
|
"port": 8890,
|
||||||
"url": null,
|
"url": null,
|
||||||
|
@ -117,6 +118,11 @@ for (const opt of required) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (finalConfig.smallAttachmentLimit > 1024 * 1024 * 8) {
|
||||||
|
finalConfig.smallAttachmentLimit = 1024 * 1024 * 8;
|
||||||
|
console.log('[WARN] smallAttachmentLimit capped at 8MB');
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure mainGuildId is internally always an array
|
// Make sure mainGuildId is internally always an array
|
||||||
if (! Array.isArray(finalConfig['mainGuildId'])) {
|
if (! Array.isArray(finalConfig['mainGuildId'])) {
|
||||||
finalConfig['mainGuildId'] = [finalConfig['mainGuildId']];
|
finalConfig['mainGuildId'] = [finalConfig['mainGuildId']];
|
||||||
|
|
Loading…
Reference in New Issue