[FIX] User status missing translate (#3960)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Alex Junior 2022-03-28 19:52:20 -03:00 committed by GitHub
parent 3c6ae8ddc7
commit 228d64f00c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -166,7 +166,11 @@ class StatusView extends React.Component<IStatusViewProps, IStatusViewState> {
dispatch(setUser({ status: item.id })); dispatch(setUser({ status: item.id }));
} }
} catch (e: any) { } 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); logEvent(events.SET_STATUS_FAIL);
log(e); log(e);
} }