Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Hotfix Android thread creation #4574

Merged
merged 1 commit into from
Jan 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions api/mutations/thread/publishThread.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow
const debug = require('debug')('api:mutations:thread:publish-thread');
import stringSimilarity from 'string-similarity';
import { convertToRaw } from 'draft-js';
import { stateFromMarkdown } from 'draft-js-import-markdown';
import type { GraphQLContext } from '../../';
import UserError from '../../utils/UserError';
Expand Down Expand Up @@ -71,11 +72,13 @@ export default requireAuth(
type = 'DRAFTJS';
if (thread.content.body) {
thread.content.body = JSON.stringify(
stateFromMarkdown(thread.content.body, {
parserOptions: {
breaks: true,
},
})
convertToRaw(
stateFromMarkdown(thread.content.body, {
parserOptions: {
breaks: true,
},
})
)
);
}
}
Expand Down