diff --git a/app/soapbox/reducers/compose.ts b/app/soapbox/reducers/compose.ts index 7aefbae25d..ef15719545 100644 --- a/app/soapbox/reducers/compose.ts +++ b/app/soapbox/reducers/compose.ts @@ -245,25 +245,13 @@ const getAccountSettings = (account: ImmutableMap) => { const importAccount = (compose: Compose, account: APIEntity) => { const settings = getAccountSettings(ImmutableMap(fromJS(account))); - const defaultPrivacy = settings.get('defaultPrivacy', 'public'); - const defaultContentType = settings.get('defaultContentType', 'text/plain'); - - return compose.merge({ - privacy: defaultPrivacy, - content_type: defaultContentType, - tagHistory: ImmutableList(tagHistory.get(account.id)), - }); -}; - -const updateAccount = (compose: Compose, account: APIEntity) => { - const settings = getAccountSettings(ImmutableMap(fromJS(account))); - const defaultPrivacy = settings.get('defaultPrivacy'); const defaultContentType = settings.get('defaultContentType'); return compose.withMutations(compose => { if (defaultPrivacy) compose.set('privacy', defaultPrivacy); if (defaultContentType) compose.set('content_type', defaultContentType); + compose.set('tagHistory', ImmutableList(tagHistory.get(account.id))); }); }; @@ -507,9 +495,8 @@ export default function compose(state = initialState, action: AnyAction) { case COMPOSE_SET_GROUP_TIMELINE_VISIBLE: return updateCompose(state, action.id, compose => compose.set('group_timeline_visible', action.groupTimelineVisible)); case ME_FETCH_SUCCESS: - return updateCompose(state, 'default', compose => importAccount(compose, action.me)); case ME_PATCH_SUCCESS: - return updateCompose(state, 'default', compose => updateAccount(compose, action.me)); + return updateCompose(state, 'default', compose => importAccount(compose, action.me)); case SETTING_CHANGE: return updateCompose(state, 'default', compose => updateSetting(compose, action.path, action.value)); default: