From 5cac1515fd791b5f6ef3bc427369a0271a403a2b Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 13 Apr 2023 13:34:54 +0900 Subject: [PATCH] =?UTF-8?q?fix(backend):=20user.memo=E3=81=AFdetail?= =?UTF-8?q?=E3=81=8Ctrue=E3=81=AA=E6=99=82=E3=81=A0=E3=81=91=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/core/entities/UserEntityService.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 68d30fe17..51e6b1d7a 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -340,11 +340,6 @@ export class UserEntityService implements OnModuleInit { const falsy = opts.detail ? false : undefined; - const memo = meId == null ? null : await this.userMemosRepository.findOneBy({ - userId: meId, - targetUserId: user.id, - }).then(row => row?.memo ?? null); - const packed = { id: user.id, name: user.name, @@ -417,6 +412,10 @@ export class UserEntityService implements OnModuleInit { isAdministrator: role.isAdministrator, displayOrder: role.displayOrder, }))), + memo: meId == null ? null : await this.userMemosRepository.findOneBy({ + userId: meId, + targetUserId: user.id, + }).then(row => row?.memo ?? null), } : {}), ...(opts.detail && isMe ? { @@ -484,10 +483,6 @@ export class UserEntityService implements OnModuleInit { isMuted: relation.isMuted, isRenoteMuted: relation.isRenoteMuted, } : {}), - - ...(memo ? { - memo, - } : {}), } as Promiseable> as Promiseable>; return await awaitAll(packed);