Fix delete & redraft of pending posts (#37839)

This commit is contained in:
Claire
2026-02-13 10:32:16 +00:00
committed by GitHub
parent 83182f9e13
commit ab9aa25cd3
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -109,7 +109,7 @@ export function fetchStatusFail(id, error, skipLoading, parentQuotePostId) {
};
}
export function redraft(status, raw_text) {
export function redraft(status, raw_text, quoted_status_id = null) {
return (dispatch, getState) => {
const maxOptions = getState().server.getIn(['server', 'configuration', 'polls', 'max_options']);
@@ -117,6 +117,7 @@ export function redraft(status, raw_text) {
type: REDRAFT,
status,
raw_text,
quoted_status_id,
maxOptions,
});
};
@@ -169,7 +170,7 @@ export function deleteStatus(id, withRedraft = false) {
dispatch(importFetchedAccount(response.data.account));
if (withRedraft) {
dispatch(redraft(status, response.data.text));
dispatch(redraft(status, response.data.text, response.data.quote?.quoted_status?.id));
ensureComposeIsVisible(getState);
} else {
dispatch(showAlert({ message: messages.deleteSuccess }));