signatures: Implement room version 9 redaction change

This commit is contained in:
Jonas Platte 2021-12-14 13:54:50 +01:00
parent 7290860019
commit 2f732bf9c2
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
3 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,7 @@ all-features = true
[features]
compat = ["tracing"]
unstable-exhaustive-types = []
unstable-pre-spec = ["ruma-identifiers/unstable-pre-spec"]
[dependencies]
base64 = "0.13.0"

View File

@ -43,7 +43,11 @@ static ALLOWED_KEYS: &[&str] = &[
fn allowed_content_keys_for(event_type: &str, version: &RoomVersionId) -> &'static [&'static str] {
match event_type {
"m.room.member" => &["membership"],
"m.room.member" => match version {
#[cfg(feature = "unstable-pre-spec")]
RoomVersionId::V9 => &["membership", "join_authorised_via_users_server"],
_ => &["membership"],
},
"m.room.create" => &["creator"],
"m.room.join_rules" => &["join_rule"],
"m.room.power_levels" => &[

View File

@ -113,6 +113,7 @@ unstable-pre-spec = [
"ruma-events/unstable-pre-spec",
"ruma-federation-api/unstable-pre-spec",
"ruma-identifiers/unstable-pre-spec",
"ruma-signatures/unstable-pre-spec",
"ruma-state-res/unstable-pre-spec"
#"ruma-identity-service-api/unstable-pre-spec",
#"ruma-push-gateway-api/unstable-pre-spec",