Add censor reason if available.
This commit is contained in:
parent
d33856434e
commit
f822232642
3 changed files with 11 additions and 2 deletions
1
flow-typed/Claim.js
vendored
1
flow-typed/Claim.js
vendored
|
@ -167,6 +167,7 @@ declare type ClaimErrorCensor = {
|
||||||
take_over_height: number,
|
take_over_height: number,
|
||||||
},
|
},
|
||||||
name: string,
|
name: string,
|
||||||
|
text: string,
|
||||||
normalized_name: string,
|
normalized_name: string,
|
||||||
nout: number,
|
nout: number,
|
||||||
permanent_url: string,
|
permanent_url: string,
|
||||||
|
|
|
@ -165,7 +165,9 @@ function ShowPage(props: Props) {
|
||||||
title={uri}
|
title={uri}
|
||||||
subtitle={
|
subtitle={
|
||||||
<>
|
<>
|
||||||
{__('Your hub has blocked this content because it subscribes to the following blocking channel:')}{' '}
|
{(!errorCensor || !errorCensor.text) &&
|
||||||
|
__('Your hub has blocked this content because it subscribes to the following blocking channel:')}
|
||||||
|
{errorCensor && errorCensor.text}{' '}
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button="link"
|
||||||
navigate={errorCensor && errorCensor.canonical_url}
|
navigate={errorCensor && errorCensor.canonical_url}
|
||||||
|
|
|
@ -87,7 +87,13 @@ export function doResolveUris(
|
||||||
if (uriResolveInfo) {
|
if (uriResolveInfo) {
|
||||||
if (uriResolveInfo.error) {
|
if (uriResolveInfo.error) {
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
resolveInfo[uri] = { ...fallbackResolveInfo, errorCensor: uriResolveInfo.error.censor };
|
resolveInfo[uri] = {
|
||||||
|
...fallbackResolveInfo,
|
||||||
|
errorCensor: {
|
||||||
|
...uriResolveInfo.error.censor,
|
||||||
|
text: uriResolveInfo.error.text,
|
||||||
|
},
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
if (checkReposts) {
|
if (checkReposts) {
|
||||||
if (uriResolveInfo.reposted_claim) {
|
if (uriResolveInfo.reposted_claim) {
|
||||||
|
|
Loading…
Reference in a new issue