refactor: Remove mystery initial state hack

This commit is contained in:
Ginger
2026-04-22 10:34:04 -04:00
parent 2e98ba3ed8
commit c1434c7935
+1 -10
View File
@@ -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);