Skip to content

Commit

Permalink
FTAの投稿の公開範囲をpublic固定から、デフォルト設定に従うように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
kiritan-pop committed Apr 17, 2024
1 parent a9c56f9 commit 8f63312
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/javascript/mastodon/actions/compose_kiri.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import api from '../api';

import { updateTimeline } from './timelines';

export const COMPOSE_CHANGE_KIRI = 'COMPOSE_CHANGE_KIRI';
Expand Down Expand Up @@ -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']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ 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) => ({
onChange(text) {
dispatch(changeCompose(text));
},
onSubmit(router) {
dispatch(submitCompose(router, "public"));
dispatch(submitCompose(router));
},
onSync(text) {
dispatch(syncCompose(text));
Expand Down

0 comments on commit 8f63312

Please sign in to comment.