diff --git a/src/__fixtures__/admin_api_frontend_config.json b/src/__fixtures__/admin_api_frontend_config.json index ee37450f8..311cb3d95 100644 --- a/src/__fixtures__/admin_api_frontend_config.json +++ b/src/__fixtures__/admin_api_frontend_config.json @@ -6,7 +6,7 @@ "value": [ { "tuple": [ - ":soapbox_fe", + ":pl_fe", { "logo": "blob:http://localhost:3036/0cdfa863-6889-4199-b870-4942cedd364f", "banner": "blob:http://localhost:3036/a835afed-6078-45bd-92b4-7ffd858c3eca", diff --git a/src/__fixtures__/config_db.json b/src/__fixtures__/config_db.json index 240164bb6..10e20a3f5 100644 --- a/src/__fixtures__/config_db.json +++ b/src/__fixtures__/config_db.json @@ -2665,7 +2665,7 @@ }, { "db": [ - ":soapbox_fe" + ":pl_fe" ], "group": ":pleroma", "key": ":frontend_configurations", @@ -2714,7 +2714,7 @@ }, { "tuple": [ - ":soapbox_fe", + ":pl_fe", { "brandColor": "#0e9066", "copyright": "♥2020. Copying is an act of love. Please copy and share.", diff --git a/src/actions/admin.ts b/src/actions/admin.ts index 917085d98..b2d53b2c5 100644 --- a/src/actions/admin.ts +++ b/src/actions/admin.ts @@ -104,7 +104,7 @@ const updateSoapboxConfig = (data: Record) => group: ':pleroma', key: ':frontend_configurations', value: [{ - tuple: [':soapbox_fe', data], + tuple: [':pl_fe', data], }], }]; diff --git a/src/actions/settings.ts b/src/actions/settings.ts index e1b5ac478..c65148d4a 100644 --- a/src/actions/settings.ts +++ b/src/actions/settings.ts @@ -13,7 +13,7 @@ const SETTING_CHANGE = 'SETTING_CHANGE' as const; const SETTING_SAVE = 'SETTING_SAVE' as const; const SETTINGS_UPDATE = 'SETTINGS_UPDATE' as const; -const FE_NAME = 'soapbox_fe'; +const FE_NAME = 'pl_fe'; /** Options when changing/saving settings. */ type SettingOpts = { diff --git a/src/actions/soapbox.ts b/src/actions/soapbox.ts index d0cdf5cca..58c4a66fc 100644 --- a/src/actions/soapbox.ts +++ b/src/actions/soapbox.ts @@ -61,9 +61,9 @@ const fetchSoapboxConfig = (host: string | null) => if (features.frontendConfigurations) { return dispatch(fetchFrontendConfigurations()).then(data => { - if (data.soapbox_fe) { - dispatch(importSoapboxConfig(data.soapbox_fe, host)); - return data.soapbox_fe; + if (data.pl_fe) { + dispatch(importSoapboxConfig(data.pl_fe, host)); + return data.pl_fe; } }); } else { diff --git a/src/reducers/compose.test.ts b/src/reducers/compose.test.ts index 181e3b335..4357748c3 100644 --- a/src/reducers/compose.test.ts +++ b/src/reducers/compose.test.ts @@ -165,7 +165,7 @@ describe('compose reducer', () => { const state = initialState.set('default', ReducerCompose({ privacy: 'public' })); const action = { type: ME_FETCH_SUCCESS, - me: { pleroma: { settings_store: { soapbox_fe: { defaultPrivacy: 'unlisted' } } } }, + me: { pleroma: { settings_store: { pl_fe: { defaultPrivacy: 'unlisted' } } } }, }; expect(reducer(state, action as any).toJS().default).toMatchObject({ privacy: 'unlisted', @@ -188,7 +188,7 @@ describe('compose reducer', () => { const state = initialState.set('default', ReducerCompose({ privacy: 'public' })); const action = { type: ME_PATCH_SUCCESS, - me: { pleroma: { settings_store: { soapbox_fe: { defaultPrivacy: 'unlisted' } } } }, + me: { pleroma: { settings_store: { pl_fe: { defaultPrivacy: 'unlisted' } } } }, }; expect(reducer(state, action).toJS().default).toMatchObject({ privacy: 'unlisted', diff --git a/src/reducers/soapbox.ts b/src/reducers/soapbox.ts index f2ac74893..c3b1cc33e 100644 --- a/src/reducers/soapbox.ts +++ b/src/reducers/soapbox.ts @@ -21,7 +21,7 @@ const updateFromAdmin = (state: ImmutableMap, configs: ImmutableLis try { return ConfigDB.find(configs, ':pleroma', ':frontend_configurations')! .get('value') - .find((value: ImmutableMap) => value.getIn(['tuple', 0]) === ':soapbox_fe') + .find((value: ImmutableMap) => value.getIn(['tuple', 0]) === ':pl_fe') .getIn(['tuple', 1]); } catch { return state; @@ -33,7 +33,7 @@ const preloadImport = (state: ImmutableMap, action: Record