diff --git a/app/soapbox/actions/statuses.js b/app/soapbox/actions/statuses.js index fb4a41b92..176f7325f 100644 --- a/app/soapbox/actions/statuses.js +++ b/app/soapbox/actions/statuses.js @@ -1,5 +1,5 @@ import { isLoggedIn } from 'soapbox/utils/auth'; -import { getFeatures, parseVersion } from 'soapbox/utils/features'; +import { getFeatures } from 'soapbox/utils/features'; import { shouldHaveCard } from 'soapbox/utils/status'; import api, { getNextLink } from '../api'; @@ -40,8 +40,6 @@ export const STATUS_UNMUTE_FAIL = 'STATUS_UNMUTE_FAIL'; export const STATUS_REVEAL = 'STATUS_REVEAL'; export const STATUS_HIDE = 'STATUS_HIDE'; -export const REDRAFT = 'REDRAFT'; - const statusExists = (getState, statusId) => { return getState().getIn(['statuses', statusId], null) !== null; }; @@ -124,22 +122,6 @@ export function fetchStatus(id) { }; } -export function redraft(status, raw_text, content_type) { - return (dispatch, getState) => { - const { instance } = getState(); - const { explicitAddressing } = getFeatures(instance); - - dispatch({ - type: REDRAFT, - status, - raw_text, - explicitAddressing, - content_type, - v: parseVersion(instance.version), - }); - }; -} - export function deleteStatus(id, routerHistory, withRedraft = false) { return (dispatch, getState) => { if (!isLoggedIn(getState)) return; diff --git a/app/soapbox/reducers/__tests__/compose-test.js b/app/soapbox/reducers/__tests__/compose-test.js index 57637209b..47565d5d6 100644 --- a/app/soapbox/reducers/__tests__/compose-test.js +++ b/app/soapbox/reducers/__tests__/compose-test.js @@ -3,7 +3,6 @@ import { Map as ImmutableMap, fromJS } from 'immutable'; import * as actions from 'soapbox/actions/compose'; import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'soapbox/actions/me'; import { SETTING_CHANGE } from 'soapbox/actions/settings'; -import { REDRAFT } from 'soapbox/actions/statuses'; import { TIMELINE_DELETE } from 'soapbox/actions/timelines'; import { normalizeStatus } from 'soapbox/normalizers/status'; @@ -39,10 +38,10 @@ describe('compose reducer', () => { expect(state.get('idempotencyKey').length === 36); }); - describe('REDRAFT', () => { + describe('COMPOSE_SET_STATUS', () => { it('strips Pleroma integer attachments', () => { const action = { - type: REDRAFT, + type: actions.COMPOSE_SET_STATUS, status: normalizeStatus(fromJS(require('soapbox/__fixtures__/pleroma-status-deleted.json'))), v: { software: 'Pleroma' }, }; @@ -53,7 +52,7 @@ describe('compose reducer', () => { it('leaves non-Pleroma integer attachments alone', () => { const action = { - type: REDRAFT, + type: actions.COMPOSE_SET_STATUS, status: normalizeStatus(fromJS(require('soapbox/__fixtures__/pleroma-status-deleted.json'))), };