refactor: 🗑️ deprecate DB_MAX_NOTE_TEXT_LENGTH
This commit is contained in:
parent
e3b8c05e47
commit
9f38f8bbca
|
@ -121,7 +121,7 @@ redis:
|
|||
# ┌─────────────────────┐
|
||||
#───┘ Other configuration └─────────────────────────────────────
|
||||
|
||||
# Maximum length of a post (default 3000, max 8192)
|
||||
# Maximum length of a post (default 3000, max 250000000)
|
||||
#maxNoteLength: 3000
|
||||
|
||||
# Maximum length of an image caption (default 1500, max 8192)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import config from "@/config/index.js";
|
||||
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
|
||||
|
||||
export const MAX_NOTE_TEXT_LENGTH =
|
||||
config.maxNoteLength != null ? config.maxNoteLength : 3000; // <- should we increase this?
|
||||
export const MAX_NOTE_TEXT_LENGTH = config.maxNoteLength ?? 3000;
|
||||
export const MAX_CAPTION_TEXT_LENGTH = Math.min(
|
||||
config.maxCaptionLength ?? 1500,
|
||||
DB_MAX_IMAGE_COMMENT_LENGTH,
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
/**
|
||||
* Maximum note text length that can be stored in DB.
|
||||
* Surrogate pairs count as one
|
||||
* DEPRECARTED: use const/MAX_NOTE_TEXT_LENGTH instead
|
||||
*/
|
||||
export const DB_MAX_NOTE_TEXT_LENGTH = 8192;
|
||||
// export const DB_MAX_NOTE_TEXT_LENGTH = 8192;
|
||||
|
||||
/**
|
||||
* Maximum image description length that can be stored in DB.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { Meta } from "@/models/entities/meta.js";
|
||||
import { insertModerationLog } from "@/services/insert-moderation-log.js";
|
||||
import { DB_MAX_NOTE_TEXT_LENGTH } from "@/misc/hard-limits.js";
|
||||
import { db } from "@/db/postgre.js";
|
||||
import define from "../../define.js";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace MisskeyEntity {
|
|||
disableRegistration: boolean
|
||||
disableLocalTimeline: boolean
|
||||
bannerUrl: string
|
||||
maxNoteTextLength: 300
|
||||
maxNoteTextLength: 3000
|
||||
emojis: Array<Emoji>
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue