add separate limits for CW length

This commit is contained in:
Hazelnoot 2024-10-26 10:04:23 -04:00
parent 10d3d9f382
commit 01e98c75ab
10 changed files with 91 additions and 9 deletions

View file

@ -73,6 +73,8 @@ type Source = {
maxFileSize?: number;
maxNoteLength?: number;
maxCwLength?: number;
maxRemoteCwLength?: number;
maxRemoteNoteLength?: number;
maxAltTextLength?: number;
maxRemoteAltTextLength?: number;
@ -153,6 +155,8 @@ export type Config = {
maxFileSize: number;
maxNoteLength: number;
maxRemoteNoteLength: number;
maxCwLength: number;
maxRemoteCwLength: number;
maxAltTextLength: number;
maxRemoteAltTextLength: number;
clusterLimit: number | undefined;
@ -308,6 +312,8 @@ export function loadConfig(): Config {
maxFileSize: config.maxFileSize ?? 262144000,
maxNoteLength: config.maxNoteLength ?? 3000,
maxRemoteNoteLength: config.maxRemoteNoteLength ?? 100000,
maxCwLength: config.maxCwLength ?? 500,
maxRemoteCwLength: config.maxRemoteCwLength ?? 5000,
maxAltTextLength: config.maxAltTextLength ?? 20000,
maxRemoteAltTextLength: config.maxRemoteAltTextLength ?? 100000,
clusterLimit: config.clusterLimit,