This commit is contained in:
syuilo 2023-05-06 10:24:14 +09:00
parent d17c2892d6
commit 0a59407a3c
1 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@ export class UserEntityService implements OnModuleInit {
public async pack<ExpectsMe extends boolean | null = null, D extends boolean = false>( public async pack<ExpectsMe extends boolean | null = null, D extends boolean = false>(
src: User['id'] | User, src: User['id'] | User,
me?: { id: User['id']; isRoot: boolean; } | null | undefined, me?: { id: User['id']; } | null | undefined,
options?: { options?: {
detail?: D, detail?: D,
includeSecrets?: boolean, includeSecrets?: boolean,
@ -308,7 +308,7 @@ export class UserEntityService implements OnModuleInit {
const meId = me ? me.id : null; const meId = me ? me.id : null;
const isMe = meId === user.id; const isMe = meId === user.id;
const iAmModerator = me ? await this.roleService.isModerator(me) : false; const iAmModerator = me ? await this.roleService.isModerator(me as User) : false;
const relation = meId && !isMe && opts.detail ? await this.getRelation(meId, user.id) : null; const relation = meId && !isMe && opts.detail ? await this.getRelation(meId, user.id) : null;
const pins = opts.detail ? await this.userNotePiningsRepository.createQueryBuilder('pin') const pins = opts.detail ? await this.userNotePiningsRepository.createQueryBuilder('pin')