diff --git a/app/soapbox/actions/importer/index.js b/app/soapbox/actions/importer/index.js index 62e9e7860..2b5828e79 100644 --- a/app/soapbox/actions/importer/index.js +++ b/app/soapbox/actions/importer/index.js @@ -124,6 +124,10 @@ export function importFetchedStatuses(statuses) { processStatus(status.reblog); } + if (status.pleroma && status.pleroma.quote && status.pleroma.quote.id) { + processStatus(status.pleroma.quote); + } + if (status.poll && status.poll.id) { pushUnique(polls, normalizePoll(status.poll)); } diff --git a/app/soapbox/actions/importer/normalizer.js b/app/soapbox/actions/importer/normalizer.js index 240abddcc..6a721b53f 100644 --- a/app/soapbox/actions/importer/normalizer.js +++ b/app/soapbox/actions/importer/normalizer.js @@ -49,6 +49,10 @@ export function normalizeStatus(status, normalOldStatus, expandSpoilers) { normalStatus.poll = status.poll.id; } + if (status.pleroma && status.pleroma.quote && status.pleroma.quote.id) { + normalStatus.quote = status.pleroma.quote.id; + } + // Only calculate these values when status first encountered // Otherwise keep the ones already in the reducer if (normalOldStatus) { diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index 6bfb2be18..fe23bae02 100644 --- a/app/soapbox/components/status.js +++ b/app/soapbox/components/status.js @@ -458,7 +458,7 @@ class Status extends ImmutablePureComponent { ); } - } else if (status.get('spoiler_text').length === 0 && !status.getIn(['pleroma', 'quote']) && status.get('card')) { + } else if (status.get('spoiler_text').length === 0 && !status.get('quote') && status.get('card')) { media = ( ; + if (status.get('quote')) { + quote = ; } if (otherAccounts && otherAccounts.size > 1) { diff --git a/app/soapbox/features/status/components/detailed_status.js b/app/soapbox/features/status/components/detailed_status.js index c1cce7550..a54c9bda5 100644 --- a/app/soapbox/features/status/components/detailed_status.js +++ b/app/soapbox/features/status/components/detailed_status.js @@ -157,14 +157,14 @@ class DetailedStatus extends ImmutablePureComponent { /> ); } - } else if (status.get('spoiler_text').length === 0 && !status.getIn(['pleroma', 'quote'])) { + } else if (status.get('spoiler_text').length === 0 && !status.get('quote')) { media = ; } let quote; - if (status.getIn(['pleroma', 'quote'])) { - quote = ; + if (status.get('quote')) { + quote = ; } if (status.get('visibility') === 'direct') { diff --git a/app/soapbox/features/status/containers/quoted_status_container.js b/app/soapbox/features/status/containers/quoted_status_container.js index 99b7763c2..a375b2562 100644 --- a/app/soapbox/features/status/containers/quoted_status_container.js +++ b/app/soapbox/features/status/containers/quoted_status_container.js @@ -7,11 +7,11 @@ import QuotedStatus from '../components/quoted_status'; const makeMapStateToProps = () => { const getStatus = makeGetStatus(); - const mapStateToProps = (state, props) => ({ - status: getStatus(state, { id: props.statusId }), + const mapStateToProps = (state, { statusId }) => ({ + status: getStatus(state, { id: statusId }), }); return mapStateToProps; }; -export default connect(makeMapStateToProps)(QuotedStatus); \ No newline at end of file +export default connect(makeMapStateToProps)(QuotedStatus);