From d2b2beef804ff75fb3792818de0253ecad63f3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Tue, 21 Nov 2023 03:11:14 +0900 Subject: [PATCH] =?UTF-8?q?enhance(word-mute):=20=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=83=9F=E3=83=A5=E3=83=BC=E3=83=88=E3=81=AE=E5=88=B6?= =?UTF-8?q?=E9=99=90=E3=82=92=E6=96=87=E5=AD=97=E6=95=B0=E3=81=8B=E3=82=89?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E9=A0=85=E7=9B=AE=E6=95=B0=E3=81=AB=20(Missk?= =?UTF-8?q?eyIO#242)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/server/api/endpoints/i/update.ts | 3 +-- packages/frontend/src/pages/admin/roles.editor.vue | 4 ++-- packages/frontend/src/pages/admin/roles.vue | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 6919e601cd..2d32420843 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -236,8 +236,7 @@ export default class extends Endpoint { // eslint- if (ps.birthday !== undefined) profileUpdates.birthday = ps.birthday; if (ps.ffVisibility !== undefined) profileUpdates.ffVisibility = ps.ffVisibility; if (ps.mutedWords !== undefined) { - // TODO: ちゃんと数える - const length = JSON.stringify(ps.mutedWords).length; + const length = ps.mutedWords.length; if (length > (await this.roleService.getUserPolicies(user.id)).wordMuteLimit) { throw new ApiError(meta.errors.tooManyMutedWords); } diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index 55203e159a..68d911e17d 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -338,7 +338,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +