From daa22d68fa8a55a2e65a1de541f903edb64ff042 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 24 Oct 2018 04:00:04 +0900 Subject: Make max allowed text length configurable (#2992) * Make max allowed text length configurable * Fix canPost --- src/config/load.ts | 2 ++ src/config/types.ts | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/config') diff --git a/src/config/load.ts b/src/config/load.ts index 3a1bac3201..9cdd742c6d 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -49,6 +49,8 @@ export default function load() { if (config.localDriveCapacityMb == null) config.localDriveCapacityMb = 256; if (config.remoteDriveCapacityMb == null) config.remoteDriveCapacityMb = 8; + if (config.maxNoteTextLength == null) config.maxNoteTextLength = 1000; + if (config.name == null) config.name = 'Misskey'; return Object.assign(config, mixin); diff --git a/src/config/types.ts b/src/config/types.ts index 139ca9e82a..fc3a3afe5f 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -103,6 +103,8 @@ export type Source = { engine: string; timeout: number; }; + + maxNoteTextLength?: number; }; /** -- cgit v1.2.3-freya