diff --git a/package.json b/package.json
index a343c063..4ed2b933 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
},
"dependencies": {
"@atproto-labs/api": "^0.12.8-clipclops.0",
- "@atproto/api": "^0.12.6",
+ "@atproto/api": "^0.12.9",
"@bam.tech/react-native-image-resizer": "^3.0.4",
"@braintree/sanitize-url": "^6.0.2",
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
diff --git a/src/components/moderation/LabelsOnMe.tsx b/src/components/moderation/LabelsOnMe.tsx
index ea5c74f9..77d0e2d9 100644
--- a/src/components/moderation/LabelsOnMe.tsx
+++ b/src/components/moderation/LabelsOnMe.tsx
@@ -32,9 +32,7 @@ export function LabelsOnMe({
if (!labels || !currentAccount) {
return null
}
- labels = labels.filter(
- l => !l.val.startsWith('!') && l.src !== currentAccount.did,
- )
+ labels = labels.filter(l => !l.val.startsWith('!'))
if (!labels.length) {
return null
}
diff --git a/src/components/moderation/LabelsOnMeDialog.tsx b/src/components/moderation/LabelsOnMeDialog.tsx
index 176b0494..858ac9ce 100644
--- a/src/components/moderation/LabelsOnMeDialog.tsx
+++ b/src/components/moderation/LabelsOnMeDialog.tsx
@@ -7,7 +7,7 @@ import {useLingui} from '@lingui/react'
import {useLabelInfo} from '#/lib/moderation/useLabelInfo'
import {makeProfileLink} from '#/lib/routes/links'
import {sanitizeHandle} from '#/lib/strings/handles'
-import {useAgent} from '#/state/session'
+import {useAgent, useSession} from '#/state/session'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
import {Button, ButtonText} from '#/components/Button'
@@ -33,13 +33,28 @@ export interface LabelsOnMeDialogProps {
labels: ComAtprotoLabelDefs.Label[]
}
-export function LabelsOnMeDialogInner(props: LabelsOnMeDialogProps) {
+export function LabelsOnMeDialog(props: LabelsOnMeDialogProps) {
+ return (
+
+
+
+
+
+ )
+}
+
+function LabelsOnMeDialogInner(props: LabelsOnMeDialogProps) {
const {_} = useLingui()
+ const {currentAccount} = useSession()
const [appealingLabel, setAppealingLabel] = React.useState<
ComAtprotoLabelDefs.Label | undefined
>(undefined)
const {subject, labels} = props
const isAccount = 'did' in subject
+ const containsSelfLabel = React.useMemo(
+ () => labels.some(l => l.src === currentAccount?.did),
+ [currentAccount?.did, labels],
+ )
return (
-
- You may appeal these labels if you feel they were placed in error.
-
+ {containsSelfLabel ? (
+
+ You may appeal non-self labels if you feel they were placed in
+ error.
+
+ ) : (
+
+ You may appeal these labels if you feel they were placed in
+ error.
+
+ )}
@@ -75,6 +98,7 @@ export function LabelsOnMeDialogInner(props: LabelsOnMeDialogProps) {
-
-
-
+ {!isSelfLabel && (
+
+
+
+ )}
- Source:{' '}
- control.close()}>
- {labeler ? sanitizeHandle(labeler.creator.handle, '@') : label.src}
-
+ {isSelfLabel ? (
+ This label was applied by you
+ ) : (
+ <>
+ Source:{' '}
+ control.close()}>
+ {labeler
+ ? sanitizeHandle(labeler.creator.handle, '@')
+ : label.src}
+
+ >
+ )}
diff --git a/yarn.lock b/yarn.lock
index 6df2993f..1e53b306 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -58,10 +58,10 @@
multiformats "^9.9.0"
tlds "^1.234.0"
-"@atproto/api@^0.12.6":
- version "0.12.6"
- resolved "https://registry.yarnpkg.com/@atproto/api/-/api-0.12.6.tgz#690c004c5ac7fc7bceac4605d8c1ec1f580be270"
- integrity sha512-30htXN2Hjl1jzzeAtIhggOsVS4vA975pMUQYoA4xMonug+z6O9NHcka3yYb4C9ldpnGugvRPKH7EhAUbiDTC5w==
+"@atproto/api@^0.12.9":
+ version "0.12.9"
+ resolved "https://registry.yarnpkg.com/@atproto/api/-/api-0.12.9.tgz#5ae040980e574a5d9496368c4ca032c0cda174ec"
+ integrity sha512-3D4n2ZAAsDRnjevvcoIxQxuMMoqc+7vtVyP7EnrEdeOmRSCF9j8yXTqhn6rcHCbzcs3DKyYR26nQemtZsMsE0g==
dependencies:
"@atproto/common-web" "^0.3.0"
"@atproto/lexicon" "^0.4.0"