被りにくい名前にする

This commit is contained in:
kakkokari-gtyih 2024-07-25 16:30:31 +09:00
parent 8af13a6502
commit 94663e1bf0
2 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
export function keys<T extends { [x: string]: unknown }>(obj: T): (keyof T)[] {
export function getObjKeys<T extends { [x: string]: unknown }>(obj: T): (keyof T)[] {
return Object.keys(obj);
}

View File

@ -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<typeof meta, typeof paramDef> { // 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);
}