diff options
| author | HJ <spam@hjkos.com> | 2018-12-27 17:13:17 +0000 |
|---|---|---|
| committer | HJ <spam@hjkos.com> | 2018-12-27 17:13:17 +0000 |
| commit | a86b80b0544ca93a1b59ff521fd9b1e8bbc3f8c9 (patch) | |
| tree | 14424ed419720cd62cd58e62e78f2fb61497fb3d /src/services | |
| parent | 754cb23f354369d57dbe3f36e530709850ae7028 (diff) | |
| parent | 0f530de397f43744ef1d83f97b76869404f80218 (diff) | |
Merge branch 'feature/no-attachment-links' into 'develop'
No attachment links
Closes #175
See merge request pleroma/pleroma-fe!442
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/api/api.service.js | 3 | ||||
| -rw-r--r-- | src/services/status_poster/status_poster.service.js | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 182f9126..4ee95bd1 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -370,12 +370,13 @@ const unretweet = ({ id, credentials }) => { }) } -const postStatus = ({credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType}) => { +const postStatus = ({credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType, noAttachmentLinks}) => { const idsText = mediaIds.join(',') const form = new FormData() form.append('status', status) form.append('source', 'Pleroma FE') + if (noAttachmentLinks) form.append('no_attachment_links', noAttachmentLinks) if (spoilerText) form.append('spoiler_text', spoilerText) if (visibility) form.append('visibility', visibility) if (sensitive) form.append('sensitive', sensitive) diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index 7f8b0fc0..1e20d336 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}) + return apiService.postStatus({credentials: store.state.users.currentUser.credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType, noAttachmentLinks: store.state.instance.noAttachmentLinks}) .then((data) => data.json()) .then((data) => { if (!data.error) { |
