handle resolving vanity channel urls

This commit is contained in:
Sean Yesmunt 2020-06-22 14:37:37 -04:00
parent c7ca11f327
commit 0ecf719daa
2 changed files with 10 additions and 0 deletions

5
dist/bundle.es.js vendored
View file

@ -5168,6 +5168,7 @@ function handleClaimAction(state, action) {
const { const {
resolveInfo resolveInfo
} = action.data; } = action.data;
const byUri = Object.assign({}, state.claimsByUri); const byUri = Object.assign({}, state.claimsByUri);
const byId = Object.assign({}, state.byId); const byId = Object.assign({}, state.byId);
const channelClaimCounts = Object.assign({}, state.channelClaimCounts); const channelClaimCounts = Object.assign({}, state.channelClaimCounts);
@ -5196,6 +5197,10 @@ function handleClaimAction(state, action) {
} }
if (channel && channel.claim_id) { if (channel && channel.claim_id) {
if (!stream) {
byUri[url] = channel.claim_id;
}
if (claimsInChannel) { if (claimsInChannel) {
channelClaimCounts[url] = claimsInChannel; channelClaimCounts[url] = claimsInChannel;
channelClaimCounts[channel.canonical_url] = claimsInChannel; channelClaimCounts[channel.canonical_url] = claimsInChannel;

View file

@ -109,6 +109,7 @@ function handleClaimAction(state: State, action: any): State {
claimsInChannel: ?number, claimsInChannel: ?number,
}, },
} = action.data; } = action.data;
const byUri = Object.assign({}, state.claimsByUri); const byUri = Object.assign({}, state.claimsByUri);
const byId = Object.assign({}, state.byId); const byId = Object.assign({}, state.byId);
const channelClaimCounts = Object.assign({}, state.channelClaimCounts); const channelClaimCounts = Object.assign({}, state.channelClaimCounts);
@ -137,6 +138,10 @@ function handleClaimAction(state: State, action: any): State {
} }
if (channel && channel.claim_id) { if (channel && channel.claim_id) {
if (!stream) {
byUri[url] = channel.claim_id;
}
if (claimsInChannel) { if (claimsInChannel) {
channelClaimCounts[url] = claimsInChannel; channelClaimCounts[url] = claimsInChannel;
channelClaimCounts[channel.canonical_url] = claimsInChannel; channelClaimCounts[channel.canonical_url] = claimsInChannel;