diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 93e2949..2c5709e 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -2010,7 +2010,7 @@ const makeSelectPendingByUri = uri => reselect.createSelector(selectPendingById, return pendingById[claimId]; }); -const makeSelectClaimForUri = uri => reselect.createSelector(selectClaimsByUri, selectPendingById, (byUri, pendingById) => { +const makeSelectClaimForUri = (uri, returnRepost = true) => reselect.createSelector(selectClaimsByUri, selectPendingById, (byUri, pendingById) => { // Check if a claim is pending first // It won't be in claimsByUri because resolving it will return nothing @@ -2038,10 +2038,11 @@ const makeSelectClaimForUri = uri => reselect.createSelector(selectClaimsByUri, } const repostedClaim = claim.reposted_claim; - if (repostedClaim) { + if (repostedClaim && returnRepost) { const channelUrl = claim.signing_channel && claim.signing_channel.canonical_url; return _extends$4({}, repostedClaim, { + repost_url: uri, repost_channel_url: channelUrl }); } else { diff --git a/src/redux/selectors/claims.js b/src/redux/selectors/claims.js index 47b6a49..6f67721 100644 --- a/src/redux/selectors/claims.js +++ b/src/redux/selectors/claims.js @@ -107,7 +107,7 @@ export const makeSelectPendingByUri = (uri: string) => } ); -export const makeSelectClaimForUri = (uri: string) => +export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true) => createSelector( selectClaimsByUri, selectPendingById, @@ -139,11 +139,12 @@ export const makeSelectClaimForUri = (uri: string) => } const repostedClaim = claim.reposted_claim; - if (repostedClaim) { + if (repostedClaim && returnRepost) { const channelUrl = claim.signing_channel && claim.signing_channel.canonical_url; return { ...repostedClaim, + repost_url: uri, repost_channel_url: channelUrl, }; } else {