Skip to content

Commit

Permalink
Add explicit error when a user is not allowed to access a room.
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed Oct 30, 2024
1 parent f1a1bd1 commit 318bb2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/1118.improvements
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Améliorer l'explication pour un externe voulant rejoindre un salon sans autorisation.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 318bb2d

Please sign in to comment.