diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-25 15:04:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 15:04:49 +0200 |
commit | 8b5179d006a07cf759e751e9d883bfe472cee868 (patch) | |
tree | e3ea9299e7a99c55b62b4ebcac1749304f6f54c0 /app/assets/javascripts/components/actions | |
parent | 3ea5b948a4cee9ea5a1e229f567974c323947ef5 (diff) |
Fix #2402 - Add Idempotency-Key header to PostStatusService that prevents (#2419)
duplicates. Web UI regenerates UUID for that header every time the compose form is changed or successfully submitted Also, fix Farsi i18n overwriting the English one
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r-- | app/assets/javascripts/components/actions/compose.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index de75ddabe..d7ff6ea63 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -85,6 +85,10 @@ export function submitCompose() { sensitive: getState().getIn(['compose', 'sensitive']), spoiler_text: getState().getIn(['compose', 'spoiler_text'], ''), visibility: getState().getIn(['compose', 'privacy']) + }, { + headers: { + 'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']) + } }).then(function (response) { dispatch(submitComposeSuccess({ ...response.data })); |