submitCompose: make it an async function

environments/review-compose-cl-jq7j47/deployments/4166
Alex Gleason 2023-10-13 13:31:39 -05:00
rodzic 181df09039
commit 8edd1a830d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -305,7 +305,7 @@ interface SubmitComposeOpts {
}
const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) =>
(dispatch: AppDispatch, getState: () => RootState) => {
async (dispatch: AppDispatch, getState: () => RootState) => {
const { history, force = false } = opts;
if (!isLoggedIn(getState)) return;
@ -367,7 +367,7 @@ const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) =>
params.group_timeline_visible = compose.group_timeline_visible; // Truth Social
}
dispatch(createStatus(params, idempotencyKey, statusId)).then(function(data) {
return dispatch(createStatus(params, idempotencyKey, statusId)).then(function(data) {
if (!statusId && data.visibility === 'direct' && getState().conversations.mounted <= 0 && history) {
history.push('/messages');
}