From c1434c79353f519f651f62ac349634f562a665be Mon Sep 17 00:00:00 2001 From: Ginger Date: Wed, 22 Apr 2026 10:34:04 -0400 Subject: [PATCH] refactor: Remove mystery initial state hack --- src/api/client/room/create.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/api/client/room/create.rs b/src/api/client/room/create.rs index 5105681b6..1eb5e432c 100644 --- a/src/api/client/room/create.rs +++ b/src/api/client/room/create.rs @@ -2,7 +2,7 @@ use std::collections::{BTreeMap, BTreeSet}; use axum::extract::State; use conduwuit::{ - Err, Result, debug, debug_info, debug_warn, err, info, + Err, Result, debug, debug_info, err, info, matrix::{StateKey, pdu::PartialPdu}, trace, warn, }; @@ -454,15 +454,6 @@ pub(crate) async fn create_room_route( debug_info!("Room creation initial state event: {event:?}"); - // client/appservice workaround: if a user sends an initial_state event with a - // state event in there with the content of literally `{}` (not null or empty - // string), let's just skip it over and warn. - if partial_pdu.content.get().eq("{}") { - debug_warn!("skipping empty initial state event with content of `{{}}`: {event:?}"); - debug_warn!("content: {}", partial_pdu.content.get()); - continue; - } - // Implicit state key defaults to "" partial_pdu.state_key.get_or_insert_with(StateKey::new);