mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Ensure quote policy is displayed as “Just me” when disabled because of visibility (#35894)
This commit is contained in:
parent
012450e87d
commit
7a76f71d99
|
@ -221,6 +221,7 @@ export function submitCompose(successCallback) {
|
|||
});
|
||||
}
|
||||
|
||||
const visibility = getState().getIn(['compose', 'privacy']);
|
||||
api().request({
|
||||
url: statusId === null ? '/api/v1/statuses' : `/api/v1/statuses/${statusId}`,
|
||||
method: statusId === null ? 'post' : 'put',
|
||||
|
@ -231,11 +232,11 @@ export function submitCompose(successCallback) {
|
|||
media_attributes,
|
||||
sensitive: getState().getIn(['compose', 'sensitive']),
|
||||
spoiler_text: getState().getIn(['compose', 'spoiler']) ? getState().getIn(['compose', 'spoiler_text'], '') : '',
|
||||
visibility: getState().getIn(['compose', 'privacy']),
|
||||
visibility: visibility,
|
||||
poll: getState().getIn(['compose', 'poll'], null),
|
||||
language: getState().getIn(['compose', 'language']),
|
||||
quoted_status_id: getState().getIn(['compose', 'quoted_status_id']),
|
||||
quote_approval_policy: getState().getIn(['compose', 'quote_policy']),
|
||||
quote_approval_policy: visibility === 'private' || visibility === 'direct' ? 'nobody' : getState().getIn(['compose', 'quote_policy']),
|
||||
},
|
||||
headers: {
|
||||
'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
|
||||
|
|
|
@ -253,7 +253,7 @@ export const VisibilityModal: FC<VisibilityModalProps> = forwardRef(
|
|||
items={quoteItems}
|
||||
onChange={handleQuotePolicyChange}
|
||||
classPrefix='visibility-dropdown'
|
||||
current={quotePolicy}
|
||||
current={disableQuotePolicy ? 'nobody' : quotePolicy}
|
||||
title={intl.formatMessage(messages.buttonTitle)}
|
||||
disabled={disableQuotePolicy}
|
||||
id={quoteDropdownId}
|
||||
|
|
Loading…
Reference in New Issue
Block a user