diff options
| author | Henry Jameson <me@hjkos.com> | 2019-03-30 12:31:50 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-03-30 12:31:50 +0200 |
| commit | 9f4a9bff464e43e1c01d621e8c55db6105d327de (patch) | |
| tree | 3124790d8a00ef148acb199efeac59594879f875 /src/services/status_poster/status_poster.service.js | |
| parent | e89a62200532a4d61de35d73299c33555aad8bed (diff) | |
| parent | 0117f6af9f8ae600e613402590de4c9364806967 (diff) | |
Merge remote-tracking branch 'upstream/develop' into minimal-scopes-mode
* upstream/develop: (173 commits)
Fix: Change condition
fix typo
update store according to retweeted status
#433 - update sort by for conversation
display replies_count right after reply icon
expose replies_count from mastodon api
Apparently, MastoAPI gives status in ancestors if you try opening a repeat...
make side drawer use gesture service and fix its animations
review/remove error hiding
errata
review
#433 - sort conversation for retweets and clean up
Revert "Merge branch 'revert-987b5162' into 'develop'"
Revert "Merge branch 'mastoapi/friends-tl' into 'develop'"
Add await to login action'
Remove console log
Fix warnings in user profile routing
Add tests for gesture service, fix bug with perpendicular directions
#255 - clean up autocomplete form
#255 - clean up user settings page with self-closing html tags
...
Diffstat (limited to 'src/services/status_poster/status_poster.service.js')
| -rw-r--r-- | src/services/status_poster/status_poster.service.js | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index f1932bb6..e70b0f26 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -4,7 +4,7 @@ import apiService from '../api/api.service.js' 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, contentType, noAttachmentLinks: store.state.instance.noAttachmentLinks}) + return apiService.postStatus({credentials: store.state.users.currentUser.credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType}) .then((data) => { if (!data.error) { store.dispatch('addNewStatuses', { @@ -26,25 +26,7 @@ const postStatus = ({ store, status, spoilerText, visibility, sensitive, media = const uploadMedia = ({ store, formData }) => { const credentials = store.state.users.currentUser.credentials - return apiService.uploadMedia({ credentials, formData }).then((xml) => { - // Firefox and Chrome treat method differently... - let link = xml.getElementsByTagName('link') - - if (link.length === 0) { - link = xml.getElementsByTagName('atom:link') - } - - link = link[0] - - const mediaData = { - id: xml.getElementsByTagName('media_id')[0].textContent, - url: xml.getElementsByTagName('media_url')[0].textContent, - image: link.getAttribute('href'), - mimetype: link.getAttribute('type') - } - - return mediaData - }) + return apiService.uploadMedia({ credentials, formData }) } const statusPosterService = { |
