clarify in content hider if label is on overall account (#9264)

* clarify in content hider if label is on overall account

* fix bool typo

* Update src/components/moderation/ContentHider.tsx

Co-authored-by: Samuel Newman <mozzius@protonmail.com>

* rename variable for clarity

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
bnewbold
2025-10-27 10:37:47 -07:00
committed by GitHub
parent 25a2a2c7f6
commit 28e132ae03
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -85,7 +85,11 @@ function ContentHiderActive({
blur.type !== 'label' ||
(blur.type === 'label' && blur.source.type !== 'user')
) {
return desc.name
if (desc.isSubjectAccount) {
return _(msg`${desc.name} (Account)`)
} else {
return desc.name
}
}
let hasAdultContentLabel = false
@@ -127,6 +131,7 @@ function ContentHiderActive({
modui?.blurs,
blur,
desc.name,
desc.isSubjectAccount,
labelDefs,
i18n.locale,
globalLabelStrings,
@@ -28,6 +28,7 @@ export interface ModerationCauseDescription {
sourceType?: ModerationCauseSource['type']
sourceAvi?: string
sourceDid?: string
isSubjectAccount?: boolean
}
export function useModerationCauseDescription(
@@ -162,6 +163,7 @@ export function useModerationCauseDescription(
sourceType: cause.source.type,
sourceAvi: labeler?.creator.avatar,
sourceDid: cause.label.src,
isSubjectAccount: cause.label.uri.startsWith('did:'),
}
}
// should never happen