diff --git a/src/api/client_server/room.rs b/src/api/client_server/room.rs index 2526cbd9..65b67d5d 100644 --- a/src/api/client_server/room.rs +++ b/src/api/client_server/room.rs @@ -92,18 +92,11 @@ pub async fn create_room_route( } let full_room_id = "!".to_owned() - + custom_room_id_s.as_str() + + &custom_room_id_s.replace('"', "") + ":" + services().globals.server_name().as_ref(); debug!("Full room ID: {}", full_room_id); - if full_room_id.contains('"') { - return Err(Error::BadRequest( - ErrorKind::InvalidParam, - "Custom room ID contained `\"` which is not allowed.", - )); - } - room_id = RoomId::parse(full_room_id).map_err(|e| { info!( "User attempted to create room with custom room ID but failed parsing: {}",