1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-05 22:56:00 +02:00

enhance: リモートユーザーのロールバッジを表示するかどうかをサーバー管理者が設定できるように (#16661)

* enhance: リモートユーザーのロールバッジを表示するかどうかをサーバー管理者が設定できるように

* Update Changelog

* build misskey-js with types
This commit is contained in:
かっこかり
2025-10-16 22:45:37 +09:00
committed by GitHub
parent b6bf3cfcb7
commit 29892d2a01
10 changed files with 60 additions and 2 deletions

View File

@@ -512,8 +512,8 @@ export class UserEntityService implements OnModuleInit {
} : undefined) : undefined,
emojis: this.customEmojiService.populateEmojis(user.emojis, user.host),
onlineStatus: this.getOnlineStatus(user),
// パフォーマンス上の理由でローカルユーザーのみ
badgeRoles: user.host == null ? this.roleService.getUserBadgeRoles(user.id).then((rs) => rs
// パフォーマンス上の理由で、明示的に設定しない場合はローカルユーザーのみ取得
badgeRoles: (this.meta.showRoleBadgesOfRemoteUsers || user.host == null) ? this.roleService.getUserBadgeRoles(user.id).then((rs) => rs
.filter((r) => r.isPublic || iAmModerator)
.sort((a, b) => b.displayOrder - a.displayOrder)
.map((r) => ({