diff --git a/src/admin/user/commands.rs b/src/admin/user/commands.rs index 9e4b348b..709e1f57 100644 --- a/src/admin/user/commands.rs +++ b/src/admin/user/commands.rs @@ -42,6 +42,12 @@ pub(super) async fn create( return Ok(RoomMessageEventContent::text_plain(format!("Userid {user_id} already exists"))); } + if user_id.is_historical() { + return Ok(RoomMessageEventContent::text_plain(format!( + "User ID {user_id} does not conform to new Matrix identifier spec" + ))); + } + let password = password.unwrap_or_else(|| utils::random_string(AUTO_GEN_PASSWORD_LENGTH)); // Create user