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

@ -1,5 +1,5 @@
import { Entity } from 'megalodon';
import { MAX_NOTE_TEXT_LENGTH, FILE_TYPE_BROWSERSAFE } from '@/const.js';
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
import type { Config } from '@/config.js';
import type { MiMeta } from '@/models/Meta.js';
@ -35,7 +35,7 @@ export async function getInstance(
max_featured_tags: 20,
},
statuses: {
max_characters: MAX_NOTE_TEXT_LENGTH,
max_characters: config.maxNoteLength,
max_media_attachments: 16,
characters_reserved_per_url: response.uri.length,
},