diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-07-06 10:17:26 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-07-06 10:17:26 +0000 |
| commit | 9ccc6174a73199dc3c5fabfc9a9769ab9265060a (patch) | |
| tree | b6fc249a476995b79a7cde911db88404c1851fe5 /src/services/api/api.service.js | |
| parent | b761bcf3334e1f464e63a87de40eb75d0906d545 (diff) | |
| parent | ada5a3806b3c36ad67d3a76f41bc1a9f18445759 (diff) | |
Merge branch 'feat/rich-text-preview' into 'develop'
Status preview #459
See merge request pleroma/pleroma-fe!1159
Diffstat (limited to 'src/services/api/api.service.js')
| -rw-r--r-- | src/services/api/api.service.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index c9ec88b7..174add70 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -645,7 +645,8 @@ const postStatus = ({ poll, mediaIds = [], inReplyToStatusId, - contentType + contentType, + preview }) => { const form = new FormData() const pollOptions = poll.options || [] @@ -675,6 +676,9 @@ const postStatus = ({ if (inReplyToStatusId) { form.append('in_reply_to_id', inReplyToStatusId) } + if (preview) { + form.append('preview', 'true') + } return fetch(MASTODON_POST_STATUS_URL, { body: form, @@ -682,13 +686,7 @@ const postStatus = ({ headers: authHeaders(credentials) }) .then((response) => { - if (response.ok) { - return response.json() - } else { - return { - error: response - } - } + return response.json() }) .then((data) => data.error ? data : parseStatus(data)) } |
