Disable small attachment relaying by default, add option for it
parent
43d80f5912
commit
8a77bf1849
|
@ -32,6 +32,8 @@ const defaultConfig = {
|
|||
"greetingMessage": null,
|
||||
"greetingAttachment": null,
|
||||
|
||||
"relaySmallAttachmentsAsAttachments": false,
|
||||
|
||||
"port": 8890,
|
||||
"url": null,
|
||||
|
||||
|
|
|
@ -108,11 +108,11 @@ class Thread {
|
|||
const formatted = '\n\n' + await utils.formatAttachment(attachment);
|
||||
logContent += formatted; // Logs always contain the link
|
||||
|
||||
if (attachment.size > 1024 * 1024 * 2) {
|
||||
threadContent += formatted;
|
||||
} else {
|
||||
if (config.relaySmallAttachmentsAsAttachments && attachment.size <= 1024 * 1024 * 2) {
|
||||
const file = await attachments.attachmentToFile(attachment);
|
||||
attachmentFiles.push(file);
|
||||
} else {
|
||||
threadContent += formatted;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue