Email domain can be limited on some homeserver, i18n of the displayed error (#754)

This commit is contained in:
Benoit Marty 2020-01-09 11:34:57 +01:00
parent 43c4e20819
commit 3d0d95c371
4 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,7 @@
<w>signin</w> <w>signin</w>
<w>signout</w> <w>signout</w>
<w>signup</w> <w>signup</w>
<w>threepid</w>
</words> </words>
</dictionary> </dictionary>
</component> </component>

View File

@ -17,6 +17,7 @@ Improvements 🙌:
Other changes: Other changes:
- Change the way RiotX identifies a session to allow the SDK to support several sessions with the same user (#800) - Change the way RiotX identifies a session to allow the SDK to support several sessions with the same user (#800)
- Exclude play-services-oss-licenses library from F-Droid build (#814) - Exclude play-services-oss-licenses library from F-Droid build (#814)
- Email domain can be limited on some homeserver, i18n of the displayed error (#754)
Bugfix 🐛: Bugfix 🐛:
- Fix crash when opening room creation screen from the room filtering screen - Fix crash when opening room creation screen from the room filtering screen

View File

@ -67,6 +67,9 @@ class DefaultErrorFormatter @Inject constructor(
throwable.error.code == MatrixError.M_NOT_JSON -> { throwable.error.code == MatrixError.M_NOT_JSON -> {
stringProvider.getString(R.string.login_error_not_json) stringProvider.getString(R.string.login_error_not_json)
} }
throwable.error.code == MatrixError.M_THREEPID_DENIED -> {
stringProvider.getString(R.string.login_error_threepid_denied)
}
throwable.error.code == MatrixError.M_LIMIT_EXCEEDED -> { throwable.error.code == MatrixError.M_LIMIT_EXCEEDED -> {
limitExceededError(throwable.error) limitExceededError(throwable.error)
} }

View File

@ -23,4 +23,6 @@
<string name="settings_developer_mode_fail_fast_title">Fail-fast</string> <string name="settings_developer_mode_fail_fast_title">Fail-fast</string>
<string name="settings_developer_mode_fail_fast_summary">RiotX may crash more often when an unexpected error occurs</string> <string name="settings_developer_mode_fail_fast_summary">RiotX may crash more often when an unexpected error occurs</string>
<string name="login_error_threepid_denied">Your email domain is not authorized to register on this server</string>
</resources> </resources>