Hide label appeal on self-labeled posts (#2232)
* Hide appeal for self-labeled post, update copy * Use correct logiczio/stable
parent
38e65fbe75
commit
47ff3e8e3f
|
@ -78,7 +78,7 @@ export async function createServer(
|
||||||
})
|
})
|
||||||
|
|
||||||
const pic = fs.readFileSync(
|
const pic = fs.readFileSync(
|
||||||
path.join(__dirname, '..', 'assets', 'default-avatar.jpg'),
|
path.join(__dirname, '..', 'assets', 'default-avatar.png'),
|
||||||
)
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -187,6 +187,9 @@ let PostThreadItemLoaded = ({
|
||||||
return makeProfileLink(post.author, 'post', urip.rkey, 'reposted-by')
|
return makeProfileLink(post.author, 'post', urip.rkey, 'reposted-by')
|
||||||
}, [post.uri, post.author])
|
}, [post.uri, post.author])
|
||||||
const repostsTitle = 'Reposts of this post'
|
const repostsTitle = 'Reposts of this post'
|
||||||
|
const isSelfLabeledPost =
|
||||||
|
moderation.decisions.post.cause?.type === 'label' &&
|
||||||
|
moderation.decisions.post.cause.label.src === currentAccount?.did
|
||||||
|
|
||||||
const translatorUrl = getTranslatorLink(
|
const translatorUrl = getTranslatorLink(
|
||||||
record?.text || '',
|
record?.text || '',
|
||||||
|
@ -351,7 +354,7 @@ let PostThreadItemLoaded = ({
|
||||||
includeMute
|
includeMute
|
||||||
style={styles.alert}
|
style={styles.alert}
|
||||||
/>
|
/>
|
||||||
{post.author.did === currentAccount?.did ? (
|
{post.author.did === currentAccount?.did && !isSelfLabeledPost ? (
|
||||||
<LabelInfo
|
<LabelInfo
|
||||||
details={{uri: post.uri, cid: post.cid}}
|
details={{uri: post.uri, cid: post.cid}}
|
||||||
labels={post.labels}
|
labels={post.labels}
|
||||||
|
|
|
@ -43,7 +43,8 @@ export function LabelInfo({
|
||||||
]}>
|
]}>
|
||||||
<Text type="sm" style={pal.text}>
|
<Text type="sm" style={pal.text}>
|
||||||
<Trans>
|
<Trans>
|
||||||
This {'did' in details ? 'account' : 'post'} has been labeled.
|
A content warning has been applied to this{' '}
|
||||||
|
{'did' in details ? 'account' : 'post'}.
|
||||||
</Trans>{' '}
|
</Trans>{' '}
|
||||||
</Text>
|
</Text>
|
||||||
<Pressable
|
<Pressable
|
||||||
|
|
Loading…
Reference in New Issue