From 94663e1bf0fe098d7d5a334d7565661d9623ec78 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:30:31 +0900 Subject: [PATCH] =?UTF-8?q?=E8=A2=AB=E3=82=8A=E3=81=AB=E3=81=8F=E3=81=84?= =?UTF-8?q?=E5=90=8D=E5=89=8D=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/misc/prelude/object.ts | 2 +- packages/backend/src/server/api/endpoints/i/update.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/misc/prelude/object.ts b/packages/backend/src/misc/prelude/object.ts index daa18ce1da..e74d461c69 100644 --- a/packages/backend/src/misc/prelude/object.ts +++ b/packages/backend/src/misc/prelude/object.ts @@ -3,6 +3,6 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -export function keys(obj: T): (keyof T)[] { +export function getObjKeys(obj: T): (keyof T)[] { return Object.keys(obj); } diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 9111175e47..cb0455862c 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -11,7 +11,7 @@ import { JSDOM } from 'jsdom'; import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; import { extractHashtags } from '@/misc/extract-hashtags.js'; import * as Acct from '@/misc/acct.js'; -import { keys } from '@/misc/prelude/object.js'; +import { getObjKeys } from '@/misc/prelude/object.js'; import type { UsersRepository, DriveFilesRepository, UserProfilesRepository, PagesRepository } from '@/models/_.js'; import type { MiLocalUser, MiUser } from '@/models/User.js'; import { birthdaySchema, descriptionSchema, locationSchema, nameSchema } from '@/models/User.js'; @@ -506,8 +506,8 @@ export default class extends Endpoint { // eslint- // 連合する必要があるプロパティが変更されている場合はフォロワーにUpdateを配信 if ( - miLocalUserKeysUsedForApPersonRender.some(k => keys(updates).includes(k)) || - miUserProfileKeysUsedForApPersonRender.some(k => keys(profileUpdates).includes(k)) + miLocalUserKeysUsedForApPersonRender.some(k => getObjKeys(updates).includes(k)) || + miUserProfileKeysUsedForApPersonRender.some(k => getObjKeys(profileUpdates).includes(k)) ) { this.accountUpdateService.publishToFollowers(user.id); }