diff --git a/src/App.scss b/src/App.scss
index 3b8b3224..becea1c9 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -451,6 +451,10 @@ nav {
color: $fallback--lightFg;
color: var(--lightFg, $fallback--lightFg);
}
+
+ .text-format {
+ float: right;
+ }
}
.visibility-notice {
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 06a428ff..7d2735c5 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -55,6 +55,7 @@ const PostStatusForm = {
newStatus: {
spoilerText: this.subject,
status: statusText,
+ contentType: 'text/plain',
nsfw: false,
files: [],
visibility: this.messageScope || this.$store.state.users.currentUser.default_scope
@@ -210,13 +211,15 @@ const PostStatusForm = {
sensitive: newStatus.nsfw,
media: newStatus.files,
store: this.$store,
- inReplyToStatusId: this.replyTo
+ inReplyToStatusId: this.replyTo,
+ contentType: newStatus.contentType
}).then((data) => {
if (!data.error) {
this.newStatus = {
status: '',
files: [],
- visibility: newStatus.visibility
+ visibility: newStatus.visibility,
+ contentType: newStatus.contentType
}
this.$emit('posted')
let el = this.$el.querySelector('textarea')
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 9f8b2661..8b8eeae0 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -32,11 +32,21 @@
@input="resize"
@paste="paste">
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/i18n/messages.js b/src/i18n/messages.js
index 30055192..bfe0d92b 100644
--- a/src/i18n/messages.js
+++ b/src/i18n/messages.js
@@ -392,6 +392,9 @@ const en = {
unlisted: 'Unlisted - Do not post to public timelines',
private: 'Followers-only - Post to followers only',
direct: 'Direct - Post to mentioned users only'
+ },
+ content_type: {
+ plain_text: 'Plain text'
}
},
finder: {
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index efea86cf..87315657 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -373,7 +373,7 @@ const unretweet = ({ id, credentials }) => {
})
}
-const postStatus = ({credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId}) => {
+const postStatus = ({credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType}) => {
const idsText = mediaIds.join(',')
const form = new FormData()
@@ -382,6 +382,7 @@ const postStatus = ({credentials, status, spoilerText, visibility, sensitive, me
if (spoilerText) form.append('spoiler_text', spoilerText)
if (visibility) form.append('visibility', visibility)
if (sensitive) form.append('sensitive', sensitive)
+ if (contentType) form.append('content_type', contentType)
form.append('media_ids', idsText)
if (inReplyToStatusId) {
form.append('in_reply_to_status_id', inReplyToStatusId)
diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js
index c3bbbaa3..7f8b0fc0 100644
--- a/src/services/status_poster/status_poster.service.js
+++ b/src/services/status_poster/status_poster.service.js
@@ -1,10 +1,10 @@
import { map } from 'lodash'
import apiService from '../api/api.service.js'
-const postStatus = ({ store, status, spoilerText, visibility, sensitive, media = [], inReplyToStatusId = undefined }) => {
+const postStatus = ({ store, status, spoilerText, visibility, sensitive, media = [], inReplyToStatusId = undefined, contentType = 'text/plain' }) => {
const mediaIds = map(media, 'id')
- return apiService.postStatus({credentials: store.state.users.currentUser.credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId})
+ return apiService.postStatus({credentials: store.state.users.currentUser.credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType})
.then((data) => data.json())
.then((data) => {
if (!data.error) {