diff options
| author | Daiki Mizukami <tesaguriguma@gmail.com> | 2024-08-09 12:10:51 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-09 12:10:51 +0900 |
| commit | 0d508db8a7a36218d38231af4e718aff0e94d9bc (patch) | |
| tree | e17b48907ba006f0492e77084093015516ce4b42 /packages/backend/src/core/entities | |
| parent | ci: change prerelease channels to alpha, beta, and rc (#14376) (diff) | |
| download | misskey-0d508db8a7a36218d38231af4e718aff0e94d9bc.tar.gz misskey-0d508db8a7a36218d38231af4e718aff0e94d9bc.tar.bz2 misskey-0d508db8a7a36218d38231af4e718aff0e94d9bc.zip | |
fix(backend): check visibility of following/followers of remote users / feat: moderators can see following/followers of all users (#14375)
* fix(backend): check visibility of following/followers of remote users
Resolves https://github.com/misskey-dev/misskey/issues/13362.
* test(backend): add tests for visibility of following/followers of remote users
* docs(changelog): update CHANGELOG.md
* feat: moderators can see following/followers of all users
* docs(changelog): update CHANGELOG.md
* refactor(backend): minor refactoring
`createPerson`と`if`の条件を統一するとともに、異常系の
処理をearly returnに追い出すための変更。
* feat(backend): moderators can see following/followers count of all users
As per https://github.com/misskey-dev/misskey/pull/14375#issuecomment-2275044908.
Diffstat (limited to 'packages/backend/src/core/entities')
| -rw-r--r-- | packages/backend/src/core/entities/UserEntityService.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 7fd093c191..9bf568bc90 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -454,12 +454,12 @@ export class UserEntityService implements OnModuleInit { } const followingCount = profile == null ? null : - (profile.followingVisibility === 'public') || isMe ? user.followingCount : + (profile.followingVisibility === 'public') || isMe || iAmModerator ? user.followingCount : (profile.followingVisibility === 'followers') && (relation && relation.isFollowing) ? user.followingCount : null; const followersCount = profile == null ? null : - (profile.followersVisibility === 'public') || isMe ? user.followersCount : + (profile.followersVisibility === 'public') || isMe || iAmModerator ? user.followersCount : (profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount : null; |