From 0ecf719daa6781e82488b91157a97784de1f14f8 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 22 Jun 2020 14:37:37 -0400 Subject: [PATCH] handle resolving vanity channel urls --- dist/bundle.es.js | 5 +++++ src/redux/reducers/claims.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 4792db5..430b1ae 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -5168,6 +5168,7 @@ function handleClaimAction(state, action) { const { resolveInfo } = action.data; + const byUri = Object.assign({}, state.claimsByUri); const byId = Object.assign({}, state.byId); const channelClaimCounts = Object.assign({}, state.channelClaimCounts); @@ -5196,6 +5197,10 @@ function handleClaimAction(state, action) { } if (channel && channel.claim_id) { + if (!stream) { + byUri[url] = channel.claim_id; + } + if (claimsInChannel) { channelClaimCounts[url] = claimsInChannel; channelClaimCounts[channel.canonical_url] = claimsInChannel; diff --git a/src/redux/reducers/claims.js b/src/redux/reducers/claims.js index 13a747e..061e555 100644 --- a/src/redux/reducers/claims.js +++ b/src/redux/reducers/claims.js @@ -109,6 +109,7 @@ function handleClaimAction(state: State, action: any): State { claimsInChannel: ?number, }, } = action.data; + const byUri = Object.assign({}, state.claimsByUri); const byId = Object.assign({}, state.byId); const channelClaimCounts = Object.assign({}, state.channelClaimCounts); @@ -137,6 +138,10 @@ function handleClaimAction(state: State, action: any): State { } if (channel && channel.claim_id) { + if (!stream) { + byUri[url] = channel.claim_id; + } + if (claimsInChannel) { channelClaimCounts[url] = claimsInChannel; channelClaimCounts[channel.canonical_url] = claimsInChannel;