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>
(cherry picked from commit 28e132ae03)
This commit is contained in:
bnewbold
2025-10-27 10:37:47 -07:00
committed by Eric Bailey
parent ca7e009836
commit 74db306096
2 changed files with 8 additions and 1 deletions
@@ -85,8 +85,12 @@ function ContentHiderActive({
blur.type !== 'label' || blur.type !== 'label' ||
(blur.type === 'label' && blur.source.type !== 'user') (blur.type === 'label' && blur.source.type !== 'user')
) { ) {
if (desc.isSubjectAccount) {
return _(msg`${desc.name} (Account)`)
} else {
return desc.name return desc.name
} }
}
let hasAdultContentLabel = false let hasAdultContentLabel = false
const selfBlurNames = modui.blurs const selfBlurNames = modui.blurs
@@ -127,6 +131,7 @@ function ContentHiderActive({
modui?.blurs, modui?.blurs,
blur, blur,
desc.name, desc.name,
desc.isSubjectAccount,
labelDefs, labelDefs,
i18n.locale, i18n.locale,
globalLabelStrings, globalLabelStrings,
@@ -28,6 +28,7 @@ export interface ModerationCauseDescription {
sourceType?: ModerationCauseSource['type'] sourceType?: ModerationCauseSource['type']
sourceAvi?: string sourceAvi?: string
sourceDid?: string sourceDid?: string
isSubjectAccount?: boolean
} }
export function useModerationCauseDescription( export function useModerationCauseDescription(
@@ -162,6 +163,7 @@ export function useModerationCauseDescription(
sourceType: cause.source.type, sourceType: cause.source.type,
sourceAvi: labeler?.creator.avatar, sourceAvi: labeler?.creator.avatar,
sourceDid: cause.label.src, sourceDid: cause.label.src,
isSubjectAccount: cause.label.uri.startsWith('did:'),
} }
} }
// should never happen // should never happen