make dialog announcement cap configurable

This commit is contained in:
bunnybeam 2025-08-28 21:12:03 +01:00
parent 4926afc264
commit 5364e8da26
No known key found for this signature in database
5 changed files with 15 additions and 2 deletions

View file

@ -98,6 +98,7 @@ type Source = {
maxRemoteAltTextLength?: number;
maxBioLength?: number;
maxRemoteBioLength?: number;
maxDialogAnnouncements?: number;
clusterLimit?: number;
@ -265,6 +266,7 @@ export type Config = {
maxRemoteAltTextLength: number;
maxBioLength: number;
maxRemoteBioLength: number;
maxDialogAnnouncements: number;
clusterLimit: number | undefined;
id: string;
outgoingAddress: string | undefined;
@ -467,6 +469,7 @@ export function loadConfig(): Config {
maxRemoteAltTextLength: config.maxRemoteAltTextLength ?? 100000,
maxBioLength: config.maxBioLength ?? 1500,
maxRemoteBioLength: config.maxRemoteBioLength ?? 15000,
maxDialogAnnouncements: config.maxDialogAnnouncements ?? 5,
clusterLimit: config.clusterLimit,
outgoingAddress: config.outgoingAddress,
outgoingAddressFamily: config.outgoingAddressFamily,
@ -664,7 +667,7 @@ function applyEnvOverrides(config: Source) {
_apply_top(['sentryForFrontend', 'browserTracingIntegration', 'routeLabel']);
_apply_top([['clusterLimit', 'deliverJobConcurrency', 'inboxJobConcurrency', 'relashionshipJobConcurrency', 'deliverJobPerSec', 'inboxJobPerSec', 'relashionshipJobPerSec', 'deliverJobMaxAttempts', 'inboxJobMaxAttempts']]);
_apply_top([['outgoingAddress', 'outgoingAddressFamily', 'proxy', 'proxySmtp', 'mediaDirectory', 'mediaProxy', 'proxyRemoteFiles', 'videoThumbnailGenerator']]);
_apply_top([['maxFileSize', 'maxNoteLength', 'maxRemoteNoteLength', 'maxAltTextLength', 'maxRemoteAltTextLength', 'maxBioLength', 'maxRemoteBioLength', 'pidFile', 'filePermissionBits']]);
_apply_top([['maxFileSize', 'maxNoteLength', 'maxRemoteNoteLength', 'maxAltTextLength', 'maxRemoteAltTextLength', 'maxBioLength', 'maxRemoteBioLength', 'maxDialogAnnouncements', 'pidFile', 'filePermissionBits']]);
_apply_top(['import', ['downloadTimeout', 'maxFileSize']]);
_apply_top([['signToActivityPubGet', 'checkActivityPubGetSignature', 'setupPassword', 'disallowExternalApRedirect']]);
_apply_top(['logging', 'sql', ['disableQueryTruncation', 'enableQueryParamLogging']]);