support blocking mature recommended results if uri is not mature
This commit is contained in:
parent
b5bbece10d
commit
d8c65c5bd3
1 changed files with 7 additions and 4 deletions
|
@ -499,7 +499,8 @@ export const makeSelectRecommendedContentForUri = (uri: string) =>
|
|||
createSelector(
|
||||
makeSelectClaimForUri(uri),
|
||||
selectSearchUrisByQuery,
|
||||
(claim, searchUrisByQuery) => {
|
||||
makeSelectClaimIsNsfw(uri),
|
||||
(claim, searchUrisByQuery, isMature) => {
|
||||
const atVanityURI = !uri.includes('#');
|
||||
|
||||
let recommendedContent;
|
||||
|
@ -513,9 +514,11 @@ export const makeSelectRecommendedContentForUri = (uri: string) =>
|
|||
return;
|
||||
}
|
||||
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, {
|
||||
related_to: claim.claim_id,
|
||||
});
|
||||
const options = { related_to: claim.claim_id }
|
||||
if (!isMature) {
|
||||
options['nsfw'] = false;
|
||||
}
|
||||
const searchQuery = getSearchQueryString(title.replace(/\//, ' '), undefined, undefined, options);
|
||||
|
||||
let searchUris = searchUrisByQuery[searchQuery];
|
||||
if (searchUris) {
|
||||
|
|
Loading…
Add table
Reference in a new issue