From 0facccd4878e14088cc4d40ff0937ff1dbcaf767 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 21 Aug 2018 00:22:47 -0400 Subject: [PATCH] use correct url for recommended conent on vanity claims --- src/renderer/page/file/view.jsx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/renderer/page/file/view.jsx b/src/renderer/page/file/view.jsx index 8e0ab3da2..6cd38b050 100644 --- a/src/renderer/page/file/view.jsx +++ b/src/renderer/page/file/view.jsx @@ -97,10 +97,13 @@ class FilePage extends React.Component { checkSubscription = (props: Props) => { if (props.subscriptions.find(sub => sub.channelName === props.claim.channel_name)) { props.checkSubscription( - buildURI({ - contentName: props.claim.channel_name, - claimId: props.claim.value.publisherSignature.certificateId, - }, false) + buildURI( + { + contentName: props.claim.channel_name, + claimId: props.claim.value.publisherSignature.certificateId, + }, + false + ) ); } }; @@ -157,6 +160,13 @@ class FilePage extends React.Component { editUri = buildURI(uriObject); } + let recommendedUri = uri; + if (!recommendedUri.includes('#')) { + // at a vanity url + // append the claim ID so we can properly strip it out of reccomended videos + recommendedUri = `${recommendedUri}#${claim.claim_id}`; + } + return (
@@ -241,7 +251,7 @@ class FilePage extends React.Component {
- +
); }