summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2018-10-24 04:00:04 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-10-24 04:00:04 +0900
commitdaa22d68fa8a55a2e65a1de541f903edb64ff042 (patch)
tree6307e3b1ff7a411b96a4213ed4685f9c32b6c3a6 /src/config
parent10.30.3 (diff)
downloadsharkey-daa22d68fa8a55a2e65a1de541f903edb64ff042.tar.gz
sharkey-daa22d68fa8a55a2e65a1de541f903edb64ff042.tar.bz2
sharkey-daa22d68fa8a55a2e65a1de541f903edb64ff042.zip
Make max allowed text length configurable (#2992)
* Make max allowed text length configurable * Fix canPost
Diffstat (limited to 'src/config')
-rw-r--r--src/config/load.ts2
-rw-r--r--src/config/types.ts2
2 files changed, 4 insertions, 0 deletions
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;
};
/**