From b770e7bd16aee8ebe63a53a0fd48ff7ad6c8b550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 28 Nov 2024 19:07:22 +0100 Subject: [PATCH] pl-fe: revert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../src/features/compose/components/content-type-button.tsx | 2 +- packages/pl-fe/src/features/preferences/index.tsx | 2 +- packages/pl-fe/src/reducers/compose.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pl-fe/src/features/compose/components/content-type-button.tsx b/packages/pl-fe/src/features/compose/components/content-type-button.tsx index e59fbad0e..9565d2b43 100644 --- a/packages/pl-fe/src/features/compose/components/content-type-button.tsx +++ b/packages/pl-fe/src/features/compose/components/content-type-button.tsx @@ -30,7 +30,7 @@ const ContentTypeButton: React.FC = ({ composeId }) => { const handleChange = (contentType: string) => () => dispatch(changeComposeContentType(composeId, contentType)); - const postFormats = instance.configuration.statuses.supported_mime_types; + const postFormats = instance.pleroma.metadata.post_formats; const options = []; diff --git a/packages/pl-fe/src/features/preferences/index.tsx b/packages/pl-fe/src/features/preferences/index.tsx index 23517cc2e..306cbcbb1 100644 --- a/packages/pl-fe/src/features/preferences/index.tsx +++ b/packages/pl-fe/src/features/preferences/index.tsx @@ -125,7 +125,7 @@ const Preferences = () => { }), [settings.locale]); const defaultContentTypeOptions = React.useMemo(() => { - const postFormats = instance.configuration.statuses.supported_mime_types; + const postFormats = instance.pleroma.metadata.post_formats; const options = Object.entries({ 'text/plain': intl.formatMessage(messages.content_type_plaintext), diff --git a/packages/pl-fe/src/reducers/compose.ts b/packages/pl-fe/src/reducers/compose.ts index a4b39a481..d68a931bb 100644 --- a/packages/pl-fe/src/reducers/compose.ts +++ b/packages/pl-fe/src/reducers/compose.ts @@ -311,7 +311,7 @@ const importAccount = (compose: Compose, account: CredentialAccount) => { // }; const updateDefaultContentType = (compose: Compose, instance: Instance) => { - const postFormats = instance.configuration.statuses.supported_mime_types; + const postFormats = instance.pleroma.metadata.post_formats; compose.content_type = postFormats.includes(compose.content_type) ? compose.content_type : postFormats.includes('text/markdown') ? 'text/markdown' : postFormats[0]; };