media description support

This commit is contained in:
William Pitcock 2019-02-18 05:03:26 +00:00 committed by xenofem
parent 391f796cb4
commit 2c6ec37e6a
9 changed files with 23 additions and 5 deletions

View file

@ -1,7 +1,7 @@
import { map } from 'lodash'
import apiService from '../api/api.service.js'
const postStatus = ({ store, status, spoilerText, visibility, sensitive, poll, media = [], inReplyToStatusId = undefined, contentType = 'text/plain' }) => {
const postStatus = ({ store, status, spoilerText, visibility, sensitive, poll, media = [], inReplyToStatusId = undefined, contentType = 'text/plain', mediaDescriptions = {} }) => {
const mediaIds = map(media, 'id')
return apiService.postStatus({
@ -13,7 +13,8 @@ const postStatus = ({ store, status, spoilerText, visibility, sensitive, poll, m
mediaIds,
inReplyToStatusId,
contentType,
poll })
poll,
mediaDescriptions })
.then((data) => {
if (!data.error) {
store.dispatch('addNewStatuses', {