From e1f13f641e3e0528571e41475cda1718cac4c532 Mon Sep 17 00:00:00 2001
From: Mar0xy <marie@kaifa.ch>
Date: Wed, 18 Oct 2023 23:50:43 +0200
Subject: [PATCH] fix: all users being marked as not approved on cards

---
 packages/backend/src/core/entities/UserEntityService.ts | 2 +-
 packages/misskey-js/src/entities.ts                     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts
index b02b0af234..02fbd50ee4 100644
--- a/packages/backend/src/core/entities/UserEntityService.ts
+++ b/packages/backend/src/core/entities/UserEntityService.ts
@@ -370,6 +370,7 @@ export class UserEntityService implements OnModuleInit {
 			isCat: user.isCat,
 			isSilenced: user.isSilenced || this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
 			speakAsCat: user.speakAsCat ?? falsy,
+			approved: user.approved,
 			instance: user.host ? this.federatedInstanceService.federatedInstanceCache.fetch(user.host).then(instance => instance ? {
 				name: instance.name,
 				softwareName: instance.softwareName,
@@ -489,7 +490,6 @@ export class UserEntityService implements OnModuleInit {
 			...(opts.includeSecrets ? {
 				email: profile!.email,
 				emailVerified: profile!.emailVerified,
-				approved: user.approved,
 				signupReason: user.signupReason,
 				securityKeysList: profile!.twoFactorEnabled
 					? this.userSecurityKeysRepository.find({
diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts
index 4ab57c6409..baf59e7283 100644
--- a/packages/misskey-js/src/entities.ts
+++ b/packages/misskey-js/src/entities.ts
@@ -16,6 +16,7 @@ export type UserLite = {
 	onlineStatus: 'online' | 'active' | 'offline' | 'unknown';
 	avatarUrl: string;
 	avatarBlurhash: string;
+	approved: boolean;
 	emojis: {
 		name: string;
 		url: string;