diff options
author | ThibG <thib@sitedethib.com> | 2019-03-05 22:20:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 22:20:58 +0100 |
commit | 772b4ba24c60e0394d25d0fad4eefb338a9befea (patch) | |
tree | 804bb8ba01b1ff55471cc558d72456d2b9d0aea9 /app/javascript/flavours/glitch/actions/blocks.js | |
parent | 2a4ce7458a16c64029842fde210089453be2ede1 (diff) | |
parent | 866496ac16b47ee17138db600519a630be833e4e (diff) |
Merge pull request #935 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/actions/blocks.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/blocks.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/blocks.js b/app/javascript/flavours/glitch/actions/blocks.js index fe44ca19a..498ce519f 100644 --- a/app/javascript/flavours/glitch/actions/blocks.js +++ b/app/javascript/flavours/glitch/actions/blocks.js @@ -1,5 +1,6 @@ import api, { getLinks } from 'flavours/glitch/util/api'; import { fetchRelationships } from './accounts'; +import { importFetchedAccounts } from './importer'; export const BLOCKS_FETCH_REQUEST = 'BLOCKS_FETCH_REQUEST'; export const BLOCKS_FETCH_SUCCESS = 'BLOCKS_FETCH_SUCCESS'; @@ -15,6 +16,7 @@ export function fetchBlocks() { api(getState).get('/api/v1/blocks').then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedAccounts(response.data)); dispatch(fetchBlocksSuccess(response.data, next ? next.uri : null)); dispatch(fetchRelationships(response.data.map(item => item.id))); }).catch(error => dispatch(fetchBlocksFail(error))); @@ -54,6 +56,7 @@ export function expandBlocks() { api(getState).get(url).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedAccounts(response.data)); dispatch(expandBlocksSuccess(response.data, next ? next.uri : null)); dispatch(fetchRelationships(response.data.map(item => item.id))); }).catch(error => dispatch(expandBlocksFail(error))); |