Merge branch 'fix-composer-md' into 'main'

Fix composer always being in Markdown

Closes #1526

See merge request soapbox-pub/soapbox!2754
This commit is contained in:
Alex Gleason 2023-09-24 18:31:41 +00:00
commit e6023d725e

View file

@ -303,7 +303,6 @@ const submitCompose = (composeId: string, routerHistory?: History, force = false
(dispatch: AppDispatch, getState: () => RootState) => {
if (!isLoggedIn(getState)) return;
const state = getState();
const { richText } = getFeatures(state.instance);
const compose = state.compose.get(composeId)!;
@ -312,8 +311,6 @@ const submitCompose = (composeId: string, routerHistory?: History, force = false
const statusId = compose.id;
let to = compose.to;
const contentType = richText ? 'text/markdown' : 'text/plain';
if (!validateSchedule(state, composeId)) {
toast.error(messages.scheduleError);
return;
@ -352,7 +349,7 @@ const submitCompose = (composeId: string, routerHistory?: History, force = false
sensitive: compose.sensitive,
spoiler_text: compose.spoiler_text,
visibility: compose.privacy,
content_type: contentType,
content_type: compose.content_type,
poll: compose.poll,
scheduled_at: compose.schedule,
to,