diff options
author | ThibG <thib@sitedethib.com> | 2019-03-06 12:20:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 12:20:17 +0100 |
commit | fefacb7b7a21fc4aa40cb18ac797ecb5c44627f6 (patch) | |
tree | 7c4dbacf4603fd834da1bf8645b894634da06d4f /app/javascript/flavours/glitch/actions/importer/index.js | |
parent | e80fabfd84c1e2d157ca1cd536f68f3c75f011c1 (diff) | |
parent | 94a0149ff3e455792050e790d397d1d4d2c2d851 (diff) |
Merge pull request #939 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/actions/importer/index.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/importer/index.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/actions/importer/index.js b/app/javascript/flavours/glitch/actions/importer/index.js index abadee817..f4372fb31 100644 --- a/app/javascript/flavours/glitch/actions/importer/index.js +++ b/app/javascript/flavours/glitch/actions/importer/index.js @@ -1,4 +1,4 @@ -import { normalizeAccount, normalizeStatus } from './normalizer'; +import { normalizeAccount, normalizeStatus, normalizePoll } from './normalizer'; export const ACCOUNT_IMPORT = 'ACCOUNT_IMPORT'; export const ACCOUNTS_IMPORT = 'ACCOUNTS_IMPORT'; @@ -71,7 +71,7 @@ export function importFetchedStatuses(statuses) { } if (status.poll && status.poll.id) { - pushUnique(polls, status.poll); + pushUnique(polls, normalizePoll(status.poll)); } } @@ -82,3 +82,9 @@ export function importFetchedStatuses(statuses) { dispatch(importStatuses(normalStatuses)); }; } + +export function importFetchedPoll(poll) { + return dispatch => { + dispatch(importPolls([normalizePoll(poll)])); + }; +} |