diff --git a/changelog.d/1118.improvements b/changelog.d/1118.improvements new file mode 100644 index 0000000000..90478180df --- /dev/null +++ b/changelog.d/1118.improvements @@ -0,0 +1 @@ +Améliorer l'explication pour un externe voulant rejoindre un salon sans autorisation. \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/core/error/ErrorFormatter.kt b/vector/src/main/java/im/vector/app/core/error/ErrorFormatter.kt index 47e650b41b..5cf32fad97 100644 --- a/vector/src/main/java/im/vector/app/core/error/ErrorFormatter.kt +++ b/vector/src/main/java/im/vector/app/core/error/ErrorFormatter.kt @@ -123,7 +123,8 @@ class DefaultErrorFormatter @Inject constructor( throwable.error.code == MatrixError.M_PASSWORD_NO_SYMBOL -> { stringProvider.getString(CommonStrings.tchap_register_pwd_no_symbol) } - throwable.error.code == MatrixError.M_UNKNOWN && + // TCHAP Add explicit error when a user is not allowed to access a room. + (throwable.error.code == MatrixError.M_UNKNOWN || throwable.error.code == MatrixError.M_FORBIDDEN) && throwable.error.message == "Not allowed to join this room" -> { stringProvider.getString(CommonStrings.room_error_access_unauthorized) }