From bb9b4f0f7a6d649d40b374e8a26ea9197aa550c9 Mon Sep 17 00:00:00 2001 From: zeppi Date: Mon, 13 Sep 2021 11:51:18 -0400 Subject: [PATCH] pass channel_id on list update --- dist/bundle.es.js | 4 ++++ src/redux/actions/claims.js | 44 +++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 80d387c..ebac4b3 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -4535,6 +4535,10 @@ function doCollectionPublishUpdate(options, isBackgroundUpdate) { updateParams['tags'] = options.tags.map(tag => tag.name); } + if (options.channel_id) { + updateParams['channel_id'] = options.channel_id; + } + return new Promise(resolve => { dispatch({ type: COLLECTION_PUBLISH_UPDATE_STARTED diff --git a/src/redux/actions/claims.js b/src/redux/actions/claims.js index a287087..9bb92af 100644 --- a/src/redux/actions/claims.js +++ b/src/redux/actions/claims.js @@ -79,7 +79,7 @@ export function doResolveUris( const collectionIds: Array = []; return Lbry.resolve({ urls: urisToResolve, ...options }).then( - async (result: ResolveResponse) => { + async(result: ResolveResponse) => { let repostedResults = {}; const repostsToResolve = []; const fallbackResolveInfo = { @@ -651,7 +651,7 @@ export function doClaimSearch( } ) { const query = createNormalizedClaimSearchKey(options); - return async (dispatch: Dispatch) => { + return async(dispatch: Dispatch) => { dispatch({ type: ACTIONS.CLAIM_SEARCH_STARTED, data: { query: query }, @@ -842,6 +842,7 @@ export function doCollectionPublishUpdate( tags?: Array, languages?: Array, claims?: Array, + channel_id?: string, }, isBackgroundUpdate?: boolean ) { @@ -853,32 +854,33 @@ export function doCollectionPublishUpdate( blocking?: true, title?: string, thumbnail_url?: string, + channel_id?: string, description?: string, claim_id: string, tags?: Array, languages?: Array, claims?: Array, clear_claims: boolean, - replace: boolean, + replace?: boolean, } = isBackgroundUpdate ? { - blocking: true, - claim_id: options.claim_id, - clear_claims: true, - } + blocking: true, + claim_id: options.claim_id, + clear_claims: true, + } : { - bid: creditsToString(options.bid), - title: options.title, - thumbnail_url: options.thumbnail_url, - description: options.description, - tags: [], - languages: options.languages || [], - locations: [], - blocking: true, - claim_id: options.claim_id, - clear_claims: true, - replace: true, - }; + bid: creditsToString(options.bid), + title: options.title, + thumbnail_url: options.thumbnail_url, + description: options.description, + tags: [], + languages: options.languages || [], + locations: [], + blocking: true, + claim_id: options.claim_id, + clear_claims: true, + replace: true, + }; if (isBackgroundUpdate && updateParams.claim_id) { const state = getState(); @@ -891,6 +893,10 @@ export function doCollectionPublishUpdate( updateParams['tags'] = options.tags.map(tag => tag.name); } + if (options.channel_id) { + updateParams['channel_id'] = options.channel_id; + } + return new Promise(resolve => { dispatch({ type: ACTIONS.COLLECTION_PUBLISH_UPDATE_STARTED, -- 2.45.2