fix: all users being marked as not approved on cards

This commit is contained in:
Mar0xy 2023-10-18 23:50:43 +02:00
parent 6e2eabbbc9
commit e1f13f641e
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
2 changed files with 2 additions and 1 deletions

View File

@ -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({

View File

@ -16,6 +16,7 @@ export type UserLite = {
onlineStatus: 'online' | 'active' | 'offline' | 'unknown';
avatarUrl: string;
avatarBlurhash: string;
approved: boolean;
emojis: {
name: string;
url: string;