diff --git a/src/event_auth.rs b/src/event_auth.rs index 3317f711..04acf141 100644 --- a/src/event_auth.rs +++ b/src/event_auth.rs @@ -263,10 +263,10 @@ pub fn auth_check( tracing::info!("power levels event allowed"); } - if incoming_event.kind() == EventType::RoomRedaction { - if !check_redaction(room_version, incoming_event, &auth_events)? { - return Ok(false); - } + if incoming_event.kind() == EventType::RoomRedaction + && !check_redaction(room_version, incoming_event, &auth_events)? + { + return Ok(false); } tracing::info!("allowing event passed all checks"); diff --git a/src/lib.rs b/src/lib.rs index a6b29b06..c782c41d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -438,20 +438,6 @@ impl StateResolution { } if pl.is_none() { - for aid in store.get_event(room_id, event_id).unwrap().auth_events() { - if let Ok(aev) = store.get_event(room_id, &aid) { - if aev.is_type_and_key(EventType::RoomCreate, "") { - if let Ok(content) = aev - .deserialize_content::() - { - if &content.creator == aev.sender() { - return 100; - } - break; - } - } - } - } return 0; }