From 4e7fa8216e63fd71fcbe398d1f3e064056c57a53 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 20 Feb 2022 19:01:06 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=97=E3=83=A9=E3=82=A4=E3=83=99=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=82=BF=E3=83=96=E3=81=A7=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=81=97=E7=9B=B4=E3=81=99=E3=81=A8=E6=96=87=E5=AD=97?= =?UTF-8?q?=E6=95=B0=E3=81=8CNaN=E3=81=AB=E3=81=AA=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/server/api/endpoints/meta.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 9ea75009e6..afc6d2805f 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -4,6 +4,7 @@ import { fetchMeta } from '@/misc/fetch-meta'; import { Ads, Emojis, Users } from '@/models/index'; import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; import { MoreThan } from 'typeorm'; +import { MAX_NOTE_TEXT_LENGTH } from '@/const'; export const meta = { tags: ['meta'], @@ -138,6 +139,10 @@ export const meta = { type: 'string', optional: false, nullable: true, }, + maxNoteTextLength: { + type: 'number', + optional: false, nullable: false, + }, emojis: { type: 'array', optional: false, nullable: false, @@ -501,6 +506,7 @@ export default define(meta, paramDef, async (ps, me) => { iconUrl: instance.iconUrl, backgroundImageUrl: instance.backgroundImageUrl, logoImageUrl: instance.logoImageUrl, + maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, // 後方互換性のため emojis: await Emojis.packMany(emojis), ads: ads.map(ad => ({ id: ad.id,