mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-07-25 13:14:51 +02:00
add comment
This commit is contained in:
@@ -337,6 +337,7 @@ const badgeRoles = computed(() => {
|
||||
const roles = appearNote.user.badgeRoles;
|
||||
if (roles == null || $i == null || $i.id !== props.note.userId) return roles;
|
||||
|
||||
// 自分のプロフィールを自分で見た場合レスポンスに非表示ロールも含まれるので、別途除外する必要がある
|
||||
const hiddenRoleIds = new Set(($i.hiddenRoleIds) ?? []);
|
||||
return roles.filter(role => !hiddenRoleIds.has(role.id));
|
||||
});
|
||||
|
||||
@@ -51,6 +51,7 @@ const badgeRoles = computed(() => {
|
||||
const roles = props.note.user.badgeRoles;
|
||||
if (roles == null || $i == null || $i.id !== props.note.userId) return roles;
|
||||
|
||||
// 自分のプロフィールを自分で見た場合レスポンスに非表示ロールも含まれるので、別途除外する必要がある
|
||||
const hiddenRoleIds = new Set(($i.hiddenRoleIds) ?? []);
|
||||
return roles.filter(role => !hiddenRoleIds.has(role.id));
|
||||
});
|
||||
|
||||
@@ -226,6 +226,7 @@ const visibleProfileRoles = computed(() => {
|
||||
const roles = user.value.roles;
|
||||
if ($i == null || $i.id !== user.value.id) return roles;
|
||||
|
||||
// 自分のプロフィールを自分で見た場合レスポンスに非表示ロールも含まれるので、別途除外する必要がある
|
||||
const hiddenRoleIds = new Set($i.hiddenRoleIds ?? []);
|
||||
return roles.filter(role => role.isPublicDisplayRequired === true || !hiddenRoleIds.has(role.id));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user