Skip to content

Commit

Permalink
[FIX] User status missing translate (RocketChat#3960)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Mello <diegolmello@gmail.com>
  • Loading branch information
AlexAlexandre and diegolmello authored Mar 28, 2022
1 parent 70b1072 commit 26987f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/StatusView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ class StatusView extends React.Component<IStatusViewProps, IStatusViewState> {
dispatch(setUser({ status: item.id }));
}
} catch (e: any) {
showErrorAlert(I18n.t(e.data.errorType));
const messageError =
e.data && e.data.error.includes('[error-too-many-requests]')
? I18n.t('error-too-many-requests', { seconds: e.data.error.replace(/\D/g, '') })
: e.data.errorType;
showErrorAlert(messageError);
logEvent(events.SET_STATUS_FAIL);
log(e);
}
Expand Down

0 comments on commit 26987f7

Please sign in to comment.