diff --git a/app/gabsocial/actions/importer/index.js b/app/gabsocial/actions/importer/index.js index bf0e6d358..1c82d93b0 100644 --- a/app/gabsocial/actions/importer/index.js +++ b/app/gabsocial/actions/importer/index.js @@ -64,7 +64,10 @@ export function importFetchedStatuses(statuses) { const polls = []; function processStatus(status) { - pushUnique(normalStatuses, normalizeStatus(status, getState().getIn(['statuses', status.id]))); + const normalOldStatus = getState().getIn(['statuses', status.id]); + const readingPrefs = getState().getIn(['preferences', 'reading']); + + pushUnique(normalStatuses, normalizeStatus(status, normalOldStatus, readingPrefs)); pushUnique(accounts, status.account); if (status.reblog && status.reblog.id) { diff --git a/app/gabsocial/actions/importer/normalizer.js b/app/gabsocial/actions/importer/normalizer.js index 5badb0c49..f1f4d7a2f 100644 --- a/app/gabsocial/actions/importer/normalizer.js +++ b/app/gabsocial/actions/importer/normalizer.js @@ -1,7 +1,6 @@ import escapeTextContentForBrowser from 'escape-html'; import emojify from '../../features/emoji/emoji'; import { unescapeHTML } from '../../utils/html'; -import { expandSpoilers } from '../../initial_state'; const domParser = new DOMParser(); @@ -35,8 +34,10 @@ export function normalizeAccount(account) { return account; } -export function normalizeStatus(status, normalOldStatus) { +export function normalizeStatus(status, normalOldStatus, readingPrefs) { const normalStatus = { ...status }; + const expandSpoilers = readingPrefs.getIn(['expand', 'spoilers']); + normalStatus.account = status.account.id; if (status.reblog && status.reblog.id) { diff --git a/app/gabsocial/initial_state.js b/app/gabsocial/initial_state.js index 1b6f0bb5f..e991df8fc 100644 --- a/app/gabsocial/initial_state.js +++ b/app/gabsocial/initial_state.js @@ -8,7 +8,6 @@ const getMeta = (prop) => initialState && initialState.meta && initialState.meta export const reduceMotion = getMeta('reduce_motion'); export const autoPlayGif = getMeta('auto_play_gif'); export const displayMedia = getMeta('display_media'); -export const expandSpoilers = getMeta('expand_spoilers'); export const unfollowModal = getMeta('unfollow_modal'); export const boostModal = getMeta('boost_modal'); export const deleteModal = getMeta('delete_modal');