Send the `lang` param to translate statuses
This commit is contained in:
parent
4ffa67c9c1
commit
8690307076
|
@ -316,11 +316,12 @@ const toggleStatusHidden = (status: Status) => {
|
|||
}
|
||||
};
|
||||
|
||||
const translateStatus = (id: string, targetLanguage?: string) => (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
const translateStatus = (id: string, lang?: string) => (dispatch: AppDispatch, getState: () => RootState) => {
|
||||
dispatch({ type: STATUS_TRANSLATE_REQUEST, id });
|
||||
|
||||
api(getState).post(`/api/v1/statuses/${id}/translate`, {
|
||||
target_language: targetLanguage,
|
||||
lang, // Mastodon API
|
||||
target_language: lang, // HACK: Rebased and Pleroma compatibility
|
||||
}).then(response => {
|
||||
dispatch({
|
||||
type: STATUS_TRANSLATE_SUCCESS,
|
||||
|
|
Loading…
Reference in New Issue