change: UserLiteにisLockedを持たせるように

This commit is contained in:
yukineko 2024-01-09 16:48:02 +09:00
parent 7387cae138
commit 1bb0c8e7a9
No known key found for this signature in database
GPG Key ID: E5BACB72109B7B90
7 changed files with 12 additions and 6 deletions

View File

@ -368,6 +368,7 @@ export class UserEntityService implements OnModuleInit {
}))) : [], }))) : [],
isBot: user.isBot, isBot: user.isBot,
isCat: user.isCat, isCat: user.isCat,
isLocked: user.isLocked,
instance: user.host ? this.federatedInstanceService.federatedInstanceCache.fetch(user.host).then(instance => instance ? { instance: user.host ? this.federatedInstanceService.federatedInstanceCache.fetch(user.host).then(instance => instance ? {
name: instance.name, name: instance.name,
softwareName: instance.softwareName, softwareName: instance.softwareName,
@ -398,7 +399,6 @@ export class UserEntityService implements OnModuleInit {
lastFetchedAt: user.lastFetchedAt ? user.lastFetchedAt.toISOString() : null, lastFetchedAt: user.lastFetchedAt ? user.lastFetchedAt.toISOString() : null,
bannerUrl: user.bannerUrl, bannerUrl: user.bannerUrl,
bannerBlurhash: user.bannerBlurhash, bannerBlurhash: user.bannerBlurhash,
isLocked: user.isLocked,
isSilenced: this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote), isSilenced: this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
isSuspended: user.isSuspended, isSuspended: user.isSuspended,
description: profile!.description, description: profile!.description,

View File

@ -93,6 +93,10 @@ export const packedUserLiteSchema = {
type: 'boolean', type: 'boolean',
nullable: false, optional: true, nullable: false, optional: true,
}, },
isLocked: {
type: 'boolean',
nullable: false, optional: true,
},
instance: { instance: {
type: 'object', type: 'object',
nullable: false, optional: true, nullable: false, optional: true,

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.2 * version: 2023.12.2
* generatedAt: 2024-01-08T14:11:08.390Z * generatedAt: 2024-01-09T07:45:28.214Z
*/ */
import type { SwitchCaseResponseType } from '../api.js'; import type { SwitchCaseResponseType } from '../api.js';

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.2 * version: 2023.12.2
* generatedAt: 2024-01-08T14:11:08.386Z * generatedAt: 2024-01-09T07:45:28.211Z
*/ */
import type { import type {

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.2 * version: 2023.12.2
* generatedAt: 2024-01-08T14:11:08.384Z * generatedAt: 2024-01-09T07:45:28.207Z
*/ */
import { operations } from './types.js'; import { operations } from './types.js';

View File

@ -1,6 +1,6 @@
/* /*
* version: 2023.12.2 * version: 2023.12.2
* generatedAt: 2024-01-08T14:11:08.383Z * generatedAt: 2024-01-09T07:45:28.205Z
*/ */
import { components } from './types.js'; import { components } from './types.js';

View File

@ -3,7 +3,7 @@
/* /*
* version: 2023.12.2 * version: 2023.12.2
* generatedAt: 2024-01-08T14:11:08.253Z * generatedAt: 2024-01-09T07:45:28.095Z
*/ */
/** /**
@ -3497,6 +3497,7 @@ export type components = {
}[]; }[];
isBot?: boolean; isBot?: boolean;
isCat?: boolean; isCat?: boolean;
isLocked?: boolean;
instance?: { instance?: {
name: string | null; name: string | null;
softwareName: string | null; softwareName: string | null;
@ -3877,6 +3878,7 @@ export type components = {
reaction: string; reaction: string;
}[] | null; }[] | null;
users?: components['schemas']['UserLite'][] | null; users?: components['schemas']['UserLite'][] | null;
role?: components['schemas']['Role'] | null;
}; };
DriveFile: { DriveFile: {
/** /**