feat: Add user locking and unlocking commands and functionality

Also corrects the response code returned by UserSuspended
This commit is contained in:
timedout
2026-01-05 19:28:25 +00:00
parent aed15f246a
commit 7502a944d7
6 changed files with 122 additions and 7 deletions
+3 -1
View File
@@ -75,10 +75,12 @@ pub(super) fn bad_request_code(kind: &ErrorKind) -> StatusCode {
| ThreepidDenied
| InviteBlocked
| WrongRoomKeysVersion { .. }
| UserSuspended
| Forbidden { .. } => StatusCode::FORBIDDEN,
// 401
| UnknownToken { .. } | MissingToken | Unauthorized => StatusCode::UNAUTHORIZED,
| UnknownToken { .. } | MissingToken | Unauthorized | UserLocked =>
StatusCode::UNAUTHORIZED,
// 400
| _ => StatusCode::BAD_REQUEST,