diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 071976a87..c487d3a80 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -734,8 +734,17 @@ export const getDirectory = ({ sort }); -export const saveAutoTranslate = ({ rid, field, value, options }: { rid: string; field: string; value: any; options: any }) => - sdk.methodCallWrapper('autoTranslate.saveSettings', rid, field, value, options); +export const saveAutoTranslate = ({ + rid, + field, + value, + options +}: { + rid: string; + field: string; + value: string; + options?: { defaultLanguage: string }; +}) => sdk.methodCallWrapper('autoTranslate.saveSettings', rid, field, value, options ?? null); export const getSupportedLanguagesAutoTranslate = () => sdk.methodCallWrapper('autoTranslate.getSupportedLanguages', 'en'); diff --git a/app/views/AutoTranslateView/index.tsx b/app/views/AutoTranslateView/index.tsx index 90aec8816..07acef800 100644 --- a/app/views/AutoTranslateView/index.tsx +++ b/app/views/AutoTranslateView/index.tsx @@ -97,12 +97,10 @@ class AutoTranslateView extends React.Component { saveAutoTranslateLanguage = async (language: string) => { logEvent(events.AT_SET_LANG); try { - // TODO: remove the parameter options, after migrate the RocketChat await RocketChat.saveAutoTranslate({ rid: this.rid, field: 'autoTranslateLanguage', - value: language, - options: null + value: language }); this.setState({ selectedLanguage: language }); } catch (error) {