diff --git a/app/javascript/mastodon/actions/compose_typed.ts b/app/javascript/mastodon/actions/compose_typed.ts index ed925914f..0f9bf5cfb 100644 --- a/app/javascript/mastodon/actions/compose_typed.ts +++ b/app/javascript/mastodon/actions/compose_typed.ts @@ -21,6 +21,10 @@ import { importFetchedStatuses } from './importer'; import { openModal } from './modal'; const messages = defineMessages({ + quoteErrorEdit: { + id: 'quote_error.edit', + defaultMessage: 'Quotes cannot be added when editing a post.', + }, quoteErrorUpload: { id: 'quote_error.upload', defaultMessage: 'Quoting is not allowed with media attachments.', @@ -124,7 +128,9 @@ export const quoteComposeByStatus = createAppThunk( false, ); - if (composeState.get('poll')) { + if (composeState.get('id')) { + dispatch(showAlert({ message: messages.quoteErrorEdit })); + } else if (composeState.get('poll')) { dispatch(showAlert({ message: messages.quoteErrorPoll })); } else if ( composeState.get('is_uploading') || @@ -184,7 +190,8 @@ export const pasteLinkCompose = createDataLoadingThunk( composeState.get('quoted_status_id') || composeState.get('is_submitting') || composeState.get('poll') || - composeState.get('is_uploading') + composeState.get('is_uploading') || + composeState.get('id') ) return; diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index fd9f35629..5ecf32ff6 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -753,6 +753,7 @@ "privacy.unlisted.short": "Quiet public", "privacy_policy.last_updated": "Last updated {date}", "privacy_policy.title": "Privacy Policy", + "quote_error.edit": "Quotes cannot be added when editing a post.", "quote_error.poll": "Quoting is not allowed with polls.", "quote_error.quote": "Only one quote at a time is allowed.", "quote_error.unauthorized": "You are not authorized to quote this post.",