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:
Marie 2023-12-31 18:22:02 +01:00
parent 031d748d0c
commit b1c26201ca
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
8 changed files with 43 additions and 12 deletions

View file

@ -7,7 +7,6 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { MetaService } from '@/core/MetaService.js';
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
import { MemorySingleCache } from '@/misc/cache.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
@ -118,7 +117,7 @@ export class NodeinfoServerService {
emailRequiredForSignup: meta.emailRequiredForSignup,
enableHcaptcha: meta.enableHcaptcha,
enableRecaptcha: meta.enableRecaptcha,
maxNoteTextLength: MAX_NOTE_TEXT_LENGTH,
maxNoteTextLength: this.config.maxNoteLength,
enableEmail: meta.enableEmail,
enableServiceWorker: meta.enableServiceWorker,
proxyAccountName: proxyAccount ? proxyAccount.username : null,