From 9f98fcff092187b1a7017f378ee30d386fae8059 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 24 Jan 2022 12:58:39 -0600 Subject: [PATCH] Fedibird compatibility, because why not --- app/soapbox/actions/importer/index.js | 5 +++++ app/soapbox/actions/importer/normalizer.js | 3 +++ app/styles/components/status.scss | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/app/soapbox/actions/importer/index.js b/app/soapbox/actions/importer/index.js index 2b5828e79..1b15956f2 100644 --- a/app/soapbox/actions/importer/index.js +++ b/app/soapbox/actions/importer/index.js @@ -75,6 +75,11 @@ export function importFetchedStatus(status, idempotencyKey) { dispatch(importFetchedStatus(status.reblog)); } + // Fedibird quotes + if (status.quote && status.quote.id) { + dispatch(importFetchedStatus(status.quote)); + } + if (status.pleroma && status.pleroma.quote && status.pleroma.quote.id) { dispatch(importFetchedStatus(status.pleroma.quote)); } diff --git a/app/soapbox/actions/importer/normalizer.js b/app/soapbox/actions/importer/normalizer.js index 6a721b53f..b9ea87ee9 100644 --- a/app/soapbox/actions/importer/normalizer.js +++ b/app/soapbox/actions/importer/normalizer.js @@ -51,6 +51,9 @@ export function normalizeStatus(status, normalOldStatus, expandSpoilers) { if (status.pleroma && status.pleroma.quote && status.pleroma.quote.id) { normalStatus.quote = status.pleroma.quote.id; + } else if (status.quote && status.quote.id) { + // Fedibird compatibility, because why not + normalStatus.quote = status.quote.id; } // Only calculate these values when status first encountered diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index 25bdfec78..2e8f75617 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -816,3 +816,11 @@ a.status-card.compact:hover { margin-top: 5px !important; } } + +/* Fedibird quote post compatibility */ +.status__content, +.quoted-status__content { + .quote-inline { + display: none; + } +}