From 8f633127c110af9d198191fced75b1215c760d3b Mon Sep 17 00:00:00 2001 From: kiritan-pop Date: Wed, 17 Apr 2024 21:57:01 +0900 Subject: [PATCH] =?UTF-8?q?FTA=E3=81=AE=E6=8A=95=E7=A8=BF=E3=81=AE?= =?UTF-8?q?=E5=85=AC=E9=96=8B=E7=AF=84=E5=9B=B2=E3=82=92public=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E3=81=8B=E3=82=89=E3=80=81=E3=83=87=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=AB=E3=83=88=E8=A8=AD=E5=AE=9A=E3=81=AB=E5=BE=93=E3=81=86?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/actions/compose_kiri.js | 3 ++- .../mastodon/features/ui/containers/columns_area_container.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/actions/compose_kiri.js b/app/javascript/mastodon/actions/compose_kiri.js index 4e6ab576fd..9b57cafd9a 100644 --- a/app/javascript/mastodon/actions/compose_kiri.js +++ b/app/javascript/mastodon/actions/compose_kiri.js @@ -1,4 +1,5 @@ import api from '../api'; + import { updateTimeline } from './timelines'; export const COMPOSE_CHANGE_KIRI = 'COMPOSE_CHANGE_KIRI'; @@ -26,7 +27,7 @@ export function submitCompose(routerHistory, vis = null) { api(getState).post('/api/v1/statuses', { status, - visibility: vis, + visibility: vis ? vis : getState().getIn(['compose', 'privacy']), }, { headers: { 'Idempotency-Key': getState().getIn(['compose_kiri', 'idempotencyKey']), diff --git a/app/javascript/mastodon/features/ui/containers/columns_area_container.js b/app/javascript/mastodon/features/ui/containers/columns_area_container.js index eaf1dddb04..1977fc3dfc 100644 --- a/app/javascript/mastodon/features/ui/containers/columns_area_container.js +++ b/app/javascript/mastodon/features/ui/containers/columns_area_container.js @@ -12,6 +12,7 @@ const mapStateToProps = state => ({ isModalOpen: !!state.get('modal').modalType, text: state.getIn(['compose_kiri', 'text']), isSubmitting: state.getIn(['compose_kiri', 'is_submitting']), + privacy: state.getIn(['compose', 'privacy']), }); const mapDispatchToProps = (dispatch) => ({ @@ -19,7 +20,7 @@ const mapDispatchToProps = (dispatch) => ({ dispatch(changeCompose(text)); }, onSubmit(router) { - dispatch(submitCompose(router, "public")); + dispatch(submitCompose(router)); }, onSync(text) { dispatch(syncCompose(text));