From 80f9b9f41de63fe83ae3896b66e30c3beca37bcb Mon Sep 17 00:00:00 2001 From: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Date: Mon, 2 Nov 2026 09:48:35 -0800 Subject: [PATCH] Fix moderation notice wording for non-post content (#12308) --- .../components/hooks/useActionedSubjectLabels.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/screens/ModerationInbox/components/hooks/useActionedSubjectLabels.ts b/src/screens/ModerationInbox/components/hooks/useActionedSubjectLabels.ts index 7da6f9ed2..13b2ff2b5 100644 --- a/src/screens/ModerationInbox/components/hooks/useActionedSubjectLabels.ts +++ b/src/screens/ModerationInbox/components/hooks/useActionedSubjectLabels.ts @@ -1,3 +1,4 @@ +import {AtUri, isAtUriString} from '@atproto/syntax' import {plural} from '@lingui/core/macro' import {useLingui} from '@lingui/react/macro' @@ -23,6 +24,10 @@ export function useActionedSubjectLabels( if (!action) return const isAccount = 'did' in item.subject + const isPost = + 'uri' in item.subject && + isAtUriString(item.subject.uri, {strict: false}) && + new AtUri(item.subject.uri).collection === 'app.bsky.feed.post' const policyLabel = action.policies?.[0]?.displayName const label = action.labels?.[0] ?? item.enforcement.labels?.[0] const labelDefinition = label @@ -41,7 +46,7 @@ export function useActionedSubjectLabels( let summary: string | undefined switch (action.type) { case 'contentRemoved': - subject = l`Your post was removed` + subject = isPost ? l`Your post was removed` : l`Your content was removed` summary = policyLabel ? l`Violates Community Guideline: ${policyLabel}` : undefined @@ -53,7 +58,9 @@ export function useActionedSubjectLabels( case 'labelApplied': subject = isAccount ? l`A label was added to your account` - : l`A label was added to your post` + : isPost + ? l`A label was added to your post` + : l`A label was added to your content` summary = labelName ? l`Label: ${labelName}` : undefined break case 'accountSuspended': { @@ -95,7 +102,9 @@ export function useActionedSubjectLabels( case 'labelRemoved': subject = isAccount ? l`A label was removed from your account` - : l`A label was removed from your post` + : isPost + ? l`A label was removed from your post` + : l`A label was removed from your content` summary = labelName ? l`Label: ${labelName}` : undefined break default: -- knotmirror 0.0.1