From 9858b33b37e68c5b53eb7ff715b2d2f17b25ea29 Mon Sep 17 00:00:00 2001
From: strawberry <strawberry@puppygock.gay>
Date: Wed, 24 Jan 2024 18:16:25 -0500
Subject: [PATCH] just remove double quotes if found instead

Signed-off-by: strawberry <strawberry@puppygock.gay>
---
 src/api/client_server/room.rs | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/api/client_server/room.rs b/src/api/client_server/room.rs
index 2526cbd90..65b67d5d6 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: {}",
-- 
GitLab