upd: Note Length customization
note length is now configurable through the config file Closes #281 falls back to 3000 (misskey default) if not used/included in config
This commit is contained in:
parent
031d748d0c
commit
b1c26201ca
8 changed files with 43 additions and 12 deletions
|
|
@ -7,8 +7,8 @@ import * as fs from 'node:fs';
|
|||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import * as yaml from 'js-yaml';
|
||||
import type { RedisOptions } from 'ioredis';
|
||||
import { globSync } from 'glob';
|
||||
import type { RedisOptions } from 'ioredis';
|
||||
|
||||
type RedisOptionsSource = Partial<RedisOptions> & {
|
||||
host: string;
|
||||
|
|
@ -65,6 +65,7 @@ type Source = {
|
|||
allowedPrivateNetworks?: string[];
|
||||
|
||||
maxFileSize?: number;
|
||||
maxNoteLength?: number;
|
||||
|
||||
clusterLimit?: number;
|
||||
|
||||
|
|
@ -133,6 +134,7 @@ export type Config = {
|
|||
proxyBypassHosts: string[] | undefined;
|
||||
allowedPrivateNetworks: string[] | undefined;
|
||||
maxFileSize: number | undefined;
|
||||
maxNoteLength: number;
|
||||
clusterLimit: number | undefined;
|
||||
id: string;
|
||||
outgoingAddress: string | undefined;
|
||||
|
|
@ -249,6 +251,7 @@ export function loadConfig(): Config {
|
|||
proxyBypassHosts: config.proxyBypassHosts,
|
||||
allowedPrivateNetworks: config.allowedPrivateNetworks,
|
||||
maxFileSize: config.maxFileSize,
|
||||
maxNoteLength: config.maxNoteLength ?? 3000,
|
||||
clusterLimit: config.clusterLimit,
|
||||
outgoingAddress: config.outgoingAddress,
|
||||
outgoingAddressFamily: config.outgoingAddressFamily,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue