Auto review

This commit is contained in:
Benoit Marty 2020-09-01 14:55:12 +02:00
parent 1a452a6cd7
commit c6bd6c17fc
3 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,7 @@ Changes in Element 1.0.6 (2020-XX-XX)
===================================================
Features ✨:
- List phone numbers and emails added to the Matrix account, and add Email adn phone numbers to account (#44, #45)
- List phone numbers and emails added to the Matrix account, and add emails and phone numbers to account (#44, #45)
Improvements 🙌:
- You can now join room through permalink and within room directory search

View File

@ -113,13 +113,13 @@ interface ProfileService {
matrixCallback: MatrixCallback<Unit>): Cancelable
/**
* Cancel adding a threepid. It will remove data store locally about this ThreePid
* Cancel adding a threepid. It will remove locally stored data about this ThreePid
*/
fun cancelAddingThreePid(threePid: ThreePid,
matrixCallback: MatrixCallback<Unit>): Cancelable
/**
* Delete a 3Pids.
* Remove a 3Pid from the Matrix account.
*/
fun deleteThreePid(threePid: ThreePid, matrixCallback: MatrixCallback<Unit>): Cancelable
}

View File

@ -91,6 +91,10 @@ class DefaultErrorFormatter @Inject constructor(
&& throwable.error.message == "Email is already in use" -> {
stringProvider.getString(R.string.account_email_already_used_error)
}
throwable.error.code == MatrixError.M_THREEPID_IN_USE
&& throwable.error.message == "MSISDN is already in use" -> {
stringProvider.getString(R.string.account_phone_number_already_used_error)
}
throwable.error.code == MatrixError.M_THREEPID_AUTH_FAILED -> {
stringProvider.getString(R.string.error_threepid_auth_failed)
}